summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr36508.c
blob: 30489923642aef5fdd124b991de3596d65aa5225 (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
/* PR tree-optimization/36508 */
/* { dg-do compile } */
/* { dg-options "-O -ftree-pre" } */

void
foo (short *sp)
{
  int k;
  k = 1;
#define SP0 *sp++ = 1;
  while (1)
    {
      if (k > 6)
	break;
      SP0
      k++;
    }
  k = 1;
  while (1)
    {
      if (k > 6)
	break;
      SP0
      k++;
    }
#define SP1 SP0 SP0 SP0 SP0 SP0 SP0 SP0 SP0 SP0 SP0 SP0
#define SP2 SP1 SP1 SP1 SP1 SP1 SP1 SP1 SP1 SP1 SP1 SP1
  SP2
}