1 /* PR tree-optimization/53265 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -Wall" } */
14 for (i
= 0; i
< 128; ++i
) /* { dg-message "note: containing loop" } */
15 a
[i
] = i
* 0x02000001; /* { dg-warning "invokes undefined behavior" } */
22 unsigned long long a
[128];
25 for (i
= 0; i
< 128; i
++) /* { dg-message "note: containing loop" } */
26 a
[i
] = (i
+ 1LL) * 0x0123456789ABCDEFLL
; /* { dg-warning "invokes undefined behavior" } */
33 unsigned char a
[16], b
[16], c
[16];
37 for (i
= 0; i
< (int) (sizeof (a
) / sizeof (a
[0])); i
++) /* { dg-message "note: containing loop" } */
39 c
[i
+ 8] = b
[i
]; /* { dg-warning "invokes undefined behavior" } */
49 unsigned int *a
[32], *o
, i
;
52 for (i
= 0; i
<= sizeof (a
) / sizeof (a
[0]); i
++) /* { dg-message "note: containing loop" "" { xfail *-*-* } } */
54 o
= a
[i
]; /* { dg-warning "invokes undefined behavior" "" { xfail *-*-* } } */
62 unsigned short a
[23940];
67 for (j
= 0; j
< 1140; j
++) /* { dg-message "note: containing loop" } */
68 a
[23940 + j
- 950] = b
[j
]; /* { dg-warning "invokes undefined behavior" } */
75 double a
[4][3], b
[12];
78 for (i
= 0; i
< 12; i
++) /* { dg-message "note: containing loop" } */
79 a
[0][i
] = b
[i
] / 10000.0; /* { dg-warning "invokes undefined behavior" } */
88 for (b
= a
[c
= 0]; c
< 16; b
= a
[++c
]) /* { dg-warning "invokes undefined behavior" "" { xfail *-*-* } } */
92 /* { dg-message "note: containing loop" "" { xfail *-*-* } 88 } */
94 const void *va
, *vb
, *vc
, *vd
, *ve
;
100 vf
[0] = va
; vf
[1] = vb
; vf
[2] = vc
; vf
[3] = vd
;
101 for (i
= 0; i
< (sizeof (vf
) / sizeof (vf
[0])); i
++)
106 int wa
, wb
[53][5], wc
[53][5];
112 for (i
= 0; i
< 53; i
++)
113 for (j
= 16 / (((wa
& 1) != 0) ? 8 : 4); j
> 0; j
--)
116 if (wb
[i
][j
] == 0 || wc
[i
][1] != 0)
118 for (k
= 0; k
< j
; k
++)
136 for (i
= 16; i
< 32; i
++) /* { dg-message "note: containing loop" } */
137 xa
[i
] = 26; /* { dg-warning "invokes undefined behavior" } */
140 __attribute__((noinline
)) static void
147 while (++i
!= x
); /* { dg-bogus "invokes undefined behavior" } */