[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gcc.dg / pr66688.c
blobc7f4ccbdacaa50255a4aa57274a7223989c37520
1 /* PR tree-optimization/66688 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fno-reorder-blocks -fcompare-debug" } */
4 /* { dg-xfail-if "" { powerpc-ibm-aix* } } */
6 struct fdt_header { unsigned magic; } *a;
8 int d;
10 int
11 __fswab32 (int p1)
13 return __builtin_bswap32 (p1);
16 void
17 fdt_set_magic (int p1)
19 struct fdt_header *b = a;
20 b->magic = __builtin_constant_p (p1) ? : __fswab32 (p1);
23 int
24 _fdt_sw_check_header ()
26 int c = ((struct fdt_header *) 1)->magic;
27 if (c)
28 return 1;
29 return 0;
32 int
33 fdt_finish ()
35 if (_fdt_sw_check_header ())
36 if (d)
37 return 0;
38 fdt_set_magic (0);
39 return 0;