Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / pr48774.c
blob91ce361ccb38645ce4a249d80bc526b382d96ae6
1 /* PR target/48774 */
2 /* { dg-do run } */
3 /* { dg-options "-O2 -funroll-loops" } */
5 extern void abort (void);
6 unsigned long int s[24]
7 = { 12, ~1, 12, ~2, 12, ~4, 12, ~8, 12, ~16, 12, ~32,
8 12, ~64, 12, ~128, 12, ~256, 12, ~512, 12, ~1024, 12, ~2048 };
9 struct { int n; unsigned long *e[12]; } g
10 = { 12, { &s[0], &s[2], &s[4], &s[6], &s[8], &s[10], &s[12], &s[14],
11 &s[16], &s[18], &s[20], &s[22] } };
12 int c[12];
14 __attribute__((noinline, noclone)) void
15 foo (void)
17 int i, j;
18 for (i = 0; i < g.n; i++)
19 for (j = 0; j < g.n; j++)
21 if (i == j && j < g.e[0][0] && (g.e[i][1] & (1UL << j)))
22 abort ();
23 if (j < g.e[0][0] && (g.e[i][1] & (1UL << j)))
24 c[i]++;
28 int
29 main ()
31 int i;
32 asm volatile ("" : "+m" (s), "+m" (g), "+m" (c));
33 foo ();
34 for (i = 0; i < 12; i++)
35 if (c[i] != 11)
36 abort ();
37 return 0;