summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr32176.c
blob: 6646db04f4f512031d95cd73a2b36a5ffa4d73cc (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
/* Contributed by Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>  */

/* { dg-do compile } */
/* { dg-options "-O2 -fprefetch-loop-arrays -w" } */
/* { dg-options "-O2 -fprefetch-loop-arrays -march=i686 -msse" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */

void foo (void)
{
  int i, m;
  float xa[21];

  m = 0;
  while (1)
    {
      i = 0;
      while (1)
	{
	  if (xa[(long int)i] == xa[(long int)(i+m)])
	    _gfortran_abort ();
	  if (i == 10)
	    break;
	  i++;
	}
      if (m == 10)
	break;
      m++;
    }
}