[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gcc.dg / pr32721.c
blobc9526f67a9b7eaa962c7050c1f23b5840facbc46
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 int spinlock[2];
5 int main ()
7 volatile int * spinlock0;
8 volatile int * spinlock1;
9 spinlock0 = &spinlock[0];
10 spinlock1 = &spinlock[1];
12 *spinlock0 = 0;
13 *spinlock1 = 0;
14 while (*spinlock0);
17 /* { dg-final { scan-tree-dump "={v} .*spinlock" "optimized" } } */
18 /* { dg-final { scan-tree-dump "spinlock.* ={v}" "optimized" } } */