Skip several analyzer socket tests on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / symbolic-12.c
blob26d9d1df93a38be5ed6bf1c067eb6284d94d4bb4
1 #include "../../gcc.dg/analyzer/analyzer-decls.h"
3 void external_fn(void);
5 struct st_1
7 char *name;
8 unsigned size;
9 };
11 void test_1a (void *p, unsigned next_off)
13 struct st_1 *r = (struct st_1 *) p;
15 external_fn();
17 if (next_off >= r->size)
18 return;
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)
30 return;
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)
40 return;
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)
49 external_fn();
51 if (next_off >= r->size)
52 return;
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;
63 while (1)
65 external_fn();
67 if (next_off >= r->size)
68 return;
70 __analyzer_dump_path (); /* { dg-message "path" } */
74 struct st_2
76 char *name;
77 unsigned arr[10];
80 void test_2a (void *p, unsigned next_off)
82 struct st_2 *r = (struct st_2 *) p;
84 external_fn();
86 if (next_off >= r->arr[5])
87 return;
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;
98 external_fn();
100 if (next_off >= r->arr[idx])
101 return;
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" } */