summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/20030917-3.c
blob: f7fabe5008ca3df07961dd273a706642d9dff4f9 (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
/* { dg-do compile } */
/* { dg-options "-O1 -fno-tree-dominator-opts -fdump-tree-ccp" } */
                                                                                

main ()
{
  int variable = 0;
  int p = 1;
  while (1)
    {
      if (p)
        break;
      variable = variable + 1;
      if (variable == 10)
        break;
    }
  printf("%d\n", variable);
}


/* The argument to "printf" should be a constant, not a variable.  */
/* { dg-final { scan-tree-dump-times "printf.*, 0" 1 "ccp"} } */