1 /* PR middle-end/30286 */
3 /* { dg-options "-O2 -ftrapv" } */
4 /* { dg-require-effective-target trapping } */
6 extern void abort (void);
7 struct S
{ struct S
*s
; };
8 struct T
{ struct S
*t
[25]; };
11 __attribute__((noinline
))
12 foo (int i
, struct T
*x
, struct S
*y
)
15 for (j
= 14; j
> i
; j
--)
27 __builtin_memset (&t
, 0, sizeof (t
));
29 for (i
= 0; i
< 25; i
++)
30 if (t
.t
[i
] != ((i
> 6 && i
<= 14) ? &s
: (struct S
*) 0))
32 __builtin_memset (&t
, 0, sizeof (t
));
34 for (i
= 0; i
< 25; i
++)
35 if (t
.t
[i
] != ((i
>= 0 && i
<= 14) ? &s
: (struct S
*) 0))