jit: Fix Darwin bootstrap after r15-1699.
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / pr94362-2.c
blob301d2ed6063ba17be80f54d7693d48789be8635f
1 /* Verify that we consider various paths to be impossible,
2 using functions to thwart early optimizations. */
4 #include "analyzer-decls.h"
6 void test_1 (int idx)
8 if (idx > 0)
9 if (idx - 1 < 0)
10 __analyzer_dump_path (); /* { dg-bogus "" } */
13 static int called_by_test_1a (int idx)
15 return idx - 1;
18 void test_1a (int idx)
20 if (idx > 0)
21 if (called_by_test_1a (idx) < 0)
22 __analyzer_dump_path (); /* { dg-bogus "" } */
25 void test_2 (int idx)
27 if (idx + 1 > 0)
28 if (idx < 0)
29 __analyzer_dump_path (); /* { dg-bogus "" } */
32 static int called_by_test_2a (int idx)
34 return idx + 1;
37 void test_2a (int idx)
39 if (called_by_test_2a (idx) > 0)
40 if (idx < 0)
41 __analyzer_dump_path (); /* { dg-bogus "" } */