[PR rtl-optimization/115877][6/n] Add testcase from pr115877
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / anon-1.c
bloba054e08f976af127b04455e63a881e0c4147a60a
1 /* Copyright (C) 2001 Free Software Foundation, Inc. */
3 /* Source: Neil Booth, 4 Nov 2001, derived from PR 2820 - field lookup in
4 nested anonymous entities was broken. */
6 void abort (void);
8 struct
10 int x;
11 struct
13 int a;
14 union
16 int b;
19 } foo;
21 int
22 main(int argc, char *argv[])
24 foo.b = 6;
25 foo.a = 5;
27 if (foo.b != 6)
28 abort ();
30 return 0;