[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gcc.dg / pr42685.c
blob29d6381cf5eee895d5c8a05fde4e20d2ffca365c
1 /* { dg-do compile } */
2 /* { dg-options "-O -funroll-loops -fcompare-debug" } */
4 struct S {
5 int i;
6 };
8 extern void baz(int);
10 static inline void bar(struct S *s)
12 baz(s->i);
15 void foo(int *w, int cond, struct S *s)
17 int i, n = 0;
18 while (*w++ != 0) n++;
19 for (i = 0; i < n; i++)
20 if (cond == 0)
21 bar(s + i);