[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gcc.dg / pr39343.c
blob70df59ef098491bc65e55de9ab75f7cdf3a8b348
1 /* PR tree-optimization/39343 */
2 /* { dg-do run } */
3 /* { dg-options "-O2" } */
5 extern void abort (void);
7 extern inline __attribute__ ((__always_inline__)) int
8 foo (char *dest)
10 return __builtin_object_size (dest, 1);
13 struct S
15 union
17 struct { int a, b; char c, d; } f;
18 struct { struct { int a, b; char c, d[255]; } e; } g;
19 } u;
22 int
23 main (void)
25 struct S s;
26 if (foo (s.u.g.e.d) != 255)
27 abort ();
28 return 0;