Add __builtion_unreachable to vector::size(), vector::capacity()
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / aliasing-2.c
blob38ceeffbe371fe96caf08559ff25e2ad49dadfee
1 #include "analyzer-decls.h"
3 extern void escape (int *p);
5 int a;
6 void test (int *p, int x)
8 int y;
10 a = 17;
11 x = 42;
12 y = 13;
14 __analyzer_eval (a == 17); /* { dg-warning "TRUE" } */
15 __analyzer_eval (x == 42); /* { dg-warning "TRUE" } */
16 __analyzer_eval (y == 13); /* { dg-warning "TRUE" } */
18 escape (&x);
19 __analyzer_eval (a == 17); /* { dg-warning "UNKNOWN" } */
20 __analyzer_eval (x == 42); /* { dg-warning "UNKNOWN" } */
21 __analyzer_eval (y == 13); /* { dg-warning "TRUE" } */
23 __analyzer_eval (p == &a); /* { dg-warning "UNKNOWN" } */
24 __analyzer_eval (p == &x); /* { dg-warning "FALSE" } */
25 __analyzer_eval (p == &y); /* { dg-warning "FALSE" } */
27 *p = 73;
29 __analyzer_eval (a == 17); /* { dg-warning "UNKNOWN" } */
30 __analyzer_eval (x == 42); /* { dg-warning "UNKNOWN" } */
31 __analyzer_eval (y == 13); /* { dg-warning "TRUE" } */