1/* PR middle-end/45852 */ 2/* { dg-options "-O2 -mcmodel=small" } */ 3/* { dg-do compile { target { *-*-linux* && { ! { ia32 } } } } } */ 4/* { dg-require-visibility "" } */ 5 6struct S { int s; }; 7 8volatile struct S globvar __attribute__((visibility ("hidden"))) = { -6 }; 9 10void 11foo (void) 12{ 13 globvar = globvar; 14} 15 16/* { dg-final { scan-assembler-times "globvar.%?rip" 2 } } */ 17