]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/pr96674.c
2 /* { dg-options "-O -fdump-tree-optimized -fwrapv" } */
7 bool __attribute__ ((noipa
)) test1 (unsigned a
, unsigned b
)
9 return (b
== 0) | (a
< b
);
12 bool __attribute__ ((noipa
)) test2 (int a
, int b
)
14 return (b
== INT_MIN
) | (a
< b
);
17 bool __attribute__ ((noipa
)) test3 (unsigned a
, unsigned b
)
19 return (b
!= 0) & (a
>= b
);
22 bool __attribute__ ((noipa
)) test4 (int a
, int b
)
24 return (b
!= INT_MIN
) & (a
>= b
);
29 if (!test1 (1, 0) || !test1 (1, 2) || test1 (2, 1) ||
30 !test2 (1, INT_MIN
) || !test2 (1, 2) || test2 (2, 1) ||
31 test3 (1, 0) || test3 (1, 2) || !test3 (2, 1) ||
32 test4 (1, INT_MIN
) || test4 (1, 2) || !test4 (2, 1)) {
39 /* { dg-final { scan-tree-dump-times "\\+ 4294967295;" 2 "optimized" } } */
40 /* { dg-final { scan-tree-dump-times "\\+ -1;" 2 "optimized" } } */