comparison gcc/testsuite/gcc.c-torture/execute/pr57130.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* PR rtl-optimization/57130 */
2
3 struct S { int a, b, c, d; } s[2] = { { 6, 8, -8, -5 }, { 0, 2, -1, 2 } };
4
5 __attribute__((noinline, noclone)) void
6 foo (struct S r)
7 {
8 static int cnt;
9 if (__builtin_memcmp (&r, &s[cnt++], sizeof r) != 0)
10 __builtin_abort ();
11 }
12
13 int
14 main ()
15 {
16 struct S r = { 6, 8, -8, -5 };
17 foo (r);
18 r = (struct S) { 0, 2, -1, 2 };
19 foo (r);
20 return 0;
21 }