PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / pr50078.c
bloba8aee43fb6a2c400aae4ef7c5cd541b71f737e47
1 /* PR tree-optimization/50078 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
5 unsigned nonvolvar[2];
7 void
8 test (int arg)
10 unsigned v = *(volatile unsigned *) (&nonvolvar[arg]);
11 *(volatile unsigned *) (&nonvolvar[arg]) = v;
14 /* { dg-final { scan-assembler-times "movl\[^\n\r\]*nonvolvar" 2 { target { { i?86-*-* x86_64-*-* } && nonpic } } } } */