diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/analyzer/pr96650-2-trans.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/analyzer/pr96650-2-trans.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr96650-2-trans.c b/gcc/testsuite/gcc.dg/analyzer/pr96650-2-trans.c new file mode 100644 index 0000000..8d0c295 --- /dev/null +++ b/gcc/testsuite/gcc.dg/analyzer/pr96650-2-trans.c @@ -0,0 +1,30 @@ +/* { dg-additional-options "-fanalyzer-transitivity" } */ + +#include "analyzer-decls.h" + +int foo (void); + +/* Infeasible path, requiring transitivity to find. */ + +void test_1 (int co, int y) +{ + if (4 < co) + if (co < y) + if (y == 0) + __analyzer_dump_path (); /* { dg-bogus "path" } */ +} + +/* Infeasible path, requiring transitivity to find, with a merger. */ + +void test_2 (int co, int y, int z) +{ + if (4 < co) + if (co < y) + if (y == 0) + { + while (foo ()) + { + } + __analyzer_dump_path (); /* { dg-bogus "path" } */ + } +} |