1 #include "../../gcc.dg/analyzer/analyzer-decls.h"
3 void external_fn(void);
11 void test_1a (void *p
, unsigned next_off
)
13 struct st_1
*r
= (struct st_1
*) p
;
17 if (next_off
>= r
->size
)
20 if (next_off
>= r
->size
)
21 /* We should have already returned if this is the case. */
22 __analyzer_dump_path (); /* { dg-bogus "path" } */
25 void test_1b (void *p
, unsigned next_off
)
27 struct st_1
*r
= (struct st_1
*) p
;
29 if (next_off
>= r
->size
)
32 if (next_off
>= r
->size
)
33 /* We should have already returned if this is the case. */
34 __analyzer_dump_path (); /* { dg-bogus "path" } */
37 void test_1c (struct st_1
*r
, unsigned next_off
)
39 if (next_off
>= r
->size
)
42 if (next_off
>= r
->size
)
43 /* We should have already returned if this is the case. */
44 __analyzer_dump_path (); /* { dg-bogus "path" } */
47 void test_1d (struct st_1
*r
, unsigned next_off
)
51 if (next_off
>= r
->size
)
54 if (next_off
>= r
->size
)
55 /* We should have already returned if this is the case. */
56 __analyzer_dump_path (); /* { dg-bogus "path" } */
59 void test_1e (void *p
, unsigned next_off
)
61 struct st_1
*r
= (struct st_1
*) p
;
67 if (next_off
>= r
->size
)
70 __analyzer_dump_path (); /* { dg-message "path" } */
80 void test_2a (void *p
, unsigned next_off
)
82 struct st_2
*r
= (struct st_2
*) p
;
86 if (next_off
>= r
->arr
[5])
89 if (next_off
>= r
->arr
[5])
90 /* We should have already returned if this is the case. */
91 __analyzer_dump_path (); /* { dg-bogus "path" } */
94 void test_2b (void *p
, unsigned next_off
, int idx
)
96 struct st_2
*r
= (struct st_2
*) p
;
100 if (next_off
>= r
->arr
[idx
])
103 if (next_off
>= r
->arr
[idx
])
104 /* We should have already returned if this is the case. */
105 __analyzer_dump_path (); /* { dg-bogus "path" } */