Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / pr66688.c
blobaf6f8443a7c88467266168a733d79c845726456d
1 /* PR tree-optimization/66688 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fno-reorder-blocks -fcompare-debug" } */
5 struct fdt_header { unsigned magic; } *a;
7 int d;
9 int
10 __fswab32 (int p1)
12 return __builtin_bswap32 (p1);
15 void
16 fdt_set_magic (int p1)
18 struct fdt_header *b = a;
19 b->magic = __builtin_constant_p (p1) ? : __fswab32 (p1);
22 int
23 _fdt_sw_check_header ()
25 int c = ((struct fdt_header *) 1)->magic;
26 if (c)
27 return 1;
28 return 0;
31 int
32 fdt_finish ()
34 if (_fdt_sw_check_header ())
35 if (d)
36 return 0;
37 fdt_set_magic (0);
38 return 0;