1 /* { dg-do compile } */ 2 /* { dg-options "-O3 -fwhole-program" } */ 3 /* { dg-final { scan-assembler "mystr" } } */ 4 5 6 extern const char *mystr; /* normally in a header */ 7 const char *mystr __attribute__ ((externally_visible)); 8 int main()9 main() 10 { 11 } 12