Debian Codegraph @

gcc/testsuite/gcc.c-torture/compile/pr37056.c

raw
1 extern void abort (void);
2
3 static union {
4 char buf[12 * sizeof (long long)];
5 } u;
6
7 int main ()
8 {
9 int off, len, i;
10 char *p, *q;
11
12 for (off = 0; off < (sizeof (long long)); off++)
13 for (len = 1; len < (10 * sizeof (long long)); len++)
14 {
15 for (i = 0; i < (12 * sizeof (long long)); i++)
16 u.buf[i] = 'a';
17 p = (__extension__ (__builtin_constant_p ('\0') && ('\0') == '\0'
18 ? ({void *__s = (u.buf + off); __s;})
19 : __builtin_memset (u.buf + off, '\0', len)));
20 if (p != u.buf + off)
21 abort ();
22 for (i = 0; i < off; i++, q++)
23 if (*q != 'a')
24 abort ();
25 }
26 return 0;
27 }
28