Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -verify -fsyntax-only |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 2 | // expected-no-diagnostics |
Steve Naroff | 3cc4af8 | 2007-12-16 21:42:28 +0000 | [diff] [blame] | 3 | |
4 | struct simple { int i; }; | ||||
5 | |||||
6 | void f(void) { | ||||
7 | struct simple s[1]; | ||||
8 | s->i = 1; | ||||
9 | } | ||||
10 | |||||
Douglas Gregor | 72de667 | 2009-01-08 20:45:30 +0000 | [diff] [blame] | 11 | typedef int x; |
12 | struct S { | ||||
13 | int x; | ||||
14 | x z; | ||||
15 | }; | ||||
16 | |||||
17 | void g(void) { | ||||
18 | struct S s[1]; | ||||
19 | s->x = 1; | ||||
20 | s->z = 2; | ||||
21 | } |