summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/vrp49.c
blob: 664ad93ef96c0cc62956769ce5f6fc8e62cb4590 (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
/* { dg-do link } */
/* { dg-options "-O2" } */

extern void link_error (void) __attribute__((noreturn));
int n;
float *x;
int main()
{
  if (n > 0)
    {
      int i = 0;
      do
	{
	  long long index;
	  i = i + 1;
	  index = i;
	  if (index <= 0)
	    link_error ();
	  x[index] = 0;
	  i = i + 1;
	  index = i;
	  if (index <= 0)
	    link_error ();
	  x[index] = 0;
	}
      while (i < n);
    }
}