summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/vrp17.c
blob: 217929d9c03592bf640a68583d24b835f937a2c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-vrp" } */

extern void abort (void) __attribute__ ((__noreturn__));
union tree_node;
typedef union tree_node *tree;
extern const unsigned char tree_code_length[];
struct tree_common
{
  int code;
};
struct tree_exp
{
  tree operands[1];
};
union tree_node
{
  struct tree_common common;
  struct tree_exp exp;
};
int
gimplify_for_stmt (tree stmt)
{
  if (2 >= tree_code_length[stmt->common.code])
    abort ();
  if (3 >= tree_code_length[stmt->common.code])
    abort ();
}

/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "vrp" } } */
/* { dg-final { cleanup-tree-dump "vrp" } } */