1 /* { dg-do compile } */ 2 /* { dg-options "-fdump-tree-optimized" } */ 3 /* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */ 4 5 static const unsigned int foo = 1; test(void)6unsigned int test( void ) 7 { 8 const volatile unsigned int *bar = &foo; 9 return ( *bar ); 10 } 11 12 /* { dg-final { scan-tree-dump-not "return 1" "optimized" } } */ 13