comparison gcc/testsuite/gcc.dg/20050330-2.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* { dg-do compile } */
2 /* { dg-require-profiling "-fprofile-generate" } */
3 /* { dg-options "-O2 -fprofile-generate" } */
4
5 struct S
6 {
7 int a;
8 void **b;
9 };
10
11 void
12 foo (struct S *x, int y)
13 {
14 if (!x)
15 return;
16 if (y >= x->a)
17 return;
18 x->a--;
19 for (; y < x->a; y++)
20 x->b[y] = x->b[y + 1];
21 x->b[x->a] = (void *) 0;
22 }