2 /* { dg-options "-O1" } */
20 #define BASE ((TYPE) -1 < 0 ? -126 : 4)
22 __attribute__ ((noinline
, noipa
))
23 void fun1(TYPE
*x
, int n
)
25 for (int i
= 0; i
< n
; i
++)
29 __attribute__ ((noinline
, noipa
, optimize("O0")))
30 void fun2(TYPE
*x
, int n
)
32 for (int i
= 0; i
< n
; i
++)
41 /* This will invoke UB due to -INT32_MIN. The test is supposed to pass
42 because GCC is supposed to handle this UB case in a predictable way. */
46 for (int i
= 1; i
< N
; ++i
)
51 printf ("%d: 0x%x\n", i
, a
[i
]);
58 printf ("%d = 0x%x == 0x%x\n", 0, a
[0], b
[0]);
60 if (a
[0] != 0x0 || b
[0] != -1)
64 for (int i
= 1; i
< N
; ++i
)
67 printf ("%d = 0x%x == 0x%x\n", i
, a
[i
], b
[i
]);