Merge from mainline
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / vrp15.c
blob7e7226487c2bd0535f09c6ac3ae7c0f3a80c8e5a
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-vrp1" } */
5 extern void abort (void) __attribute__ ((__noreturn__));
6 union tree_node;
7 typedef union tree_node *tree;
8 enum tree_code
10 ERROR_MARK,
11 COND_EXPR = 42,
13 extern const unsigned char tree_code_length[];
14 struct tree_common
16 enum tree_code code:8;
18 union tree_node
20 struct tree_common common;
22 void
23 blah (tree t)
25 if (t->common.code != COND_EXPR)
26 abort ();
27 if (1 >= tree_code_length[t->common.code])
28 abort ();
32 /* { dg-final { scan-tree-dump-times "tree_code_length.42." 1 "vrp1" } } */
33 /* { dg-final { cleanup-tree-dump "vrp1" } } */