PR testsuite/52641
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / vrp56.c
blob912d28e0f643544e0b4e02c4ebab3da3c6590cae
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-vrp1-details" } */
3 typedef struct basic_block_def *basic_block;
4 struct basic_block_def;
5 struct edge_def;
6 typedef struct edge_def *edge;
7 typedef struct VEC_edge_base
9 unsigned num;
10 } VEC_edge_base;
11 typedef struct VEC_edge_none
13 VEC_edge_base base;
14 } VEC_edge_none;
15 static __inline__ unsigned
16 VEC_edge_base_length (VEC_edge_base * vec_)
18 return vec_ ? vec_->num : 0;
21 typedef struct VEC_edge_gc
23 VEC_edge_base base;
24 } VEC_edge_gc;
25 struct basic_block_def
27 VEC_edge_gc *succs;
30 unsigned char
31 cleanup_empty_eh (basic_block bb)
33 edge e_out;
34 switch (VEC_edge_base_length (&bb->succs->base))
36 case 1:
37 foo ();
40 /* { dg-final { scan-tree-dump-times "Threaded" 1 "vrp1"} } */
41 /* { dg-final { cleanup-tree-dump "vrp1" } } */