re PR tree-optimization/33291 (a+=2; a+=2 not simplified to a+=4; with -O3 ...
[gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / loop-29.c
1 /* PR 31885 */
2
3 /* { dg-do compile } */
4 /* { dg-options "-O1 -fdump-tree-empty" } */
5
6 struct s {
7 int *blah;
8 };
9
10 static struct s array[] = { { 0 } };
11
12 void
13 foo (struct s *p)
14 {
15 struct s *q = &array[1];
16 while (p < q)
17 p++;
18 }
19
20 /* { dg-final { scan-tree-dump-times "Removing empty loop" 1 "empty" } } */
21 /* { dg-final { cleanup-tree-dump "empty" } } */