re PR tree-optimization/50472 (Volatile qualification in data is not enough to avoid...
[platform/upstream/gcc.git] / gcc / testsuite / gcc.dg / torture / pr50472.c
1 /* { dg-do compile } */
2 /* { dg-options "-fdump-tree-optimized" } */
3
4 static const unsigned int foo = 1;
5 unsigned int test( void )
6 {
7   const volatile unsigned int *bar = &foo;
8   return ( *bar );
9 }
10
11 /* { dg-final { scan-tree-dump-not "return 1" "optimized" } } */
12 /* { dg-final { cleanup-tree-dump "optimized" } } */