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