diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/strict-overflow-4.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/strict-overflow-4.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/strict-overflow-4.c b/gcc/testsuite/gcc.dg/strict-overflow-4.c new file mode 100644 index 0000000..c89db21 --- /dev/null +++ b/gcc/testsuite/gcc.dg/strict-overflow-4.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-options "-fstrict-overflow -O2 -fdump-tree-final_cleanup" } */ + +/* Source: Ian Lance Taylor. Dual of no-strict-overflow-4.c. */ + +/* We can only simplify the conditional when using strict overflow + semantics. */ + +int +foo (int i) +{ + return i + 1 > i; +} + +/* We expect to see "<bb N>"; confirm that, so that we know to count + it in the real test. */ +/* { dg-final { scan-tree-dump-times "<bb\[^>\]*>" 1 "final_cleanup" } } */ +/* { dg-final { scan-tree-dump-times ">|<" 2 "final_cleanup" } } */ +/* { dg-final { cleanup-tree-dump "final_cleanup" } } */ |