1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fwhole-program" } */
3 /* { dg-final { scan-assembler "foo1" } } */
4 /* { dg-final { scan-assembler "foo2" } } */
5 /* { dg-final { scan-assembler "foo3" } } */
6 /* { dg-final { scan-assembler "foo4" } } */
7 /* { dg-final { scan-assembler "foo5" } } */
8 /* { dg-final { scan-assembler-not "foo6" } } */
9 /* { dg-final { scan-assembler "bar1" } } */
10 /* { dg-final { scan-assembler "bar2" } } */
11 /* { dg-final { scan-assembler "bar3" } } */
12 /* { dg-final { scan-assembler "bar4" } } */
13 /* { dg-final { scan-assembler "bar5" } } */
14 /* { dg-final { scan-assembler-not "bar6" } } */
16 extern void foo1 (void) __attribute__((externally_visible
));
19 extern void foo2 (void) __attribute__((externally_visible
));
20 __attribute__((externally_visible
)) void foo2 (void) { }
22 extern void foo3 (void);
23 __attribute__((externally_visible
)) void foo3 (void) { }
25 __attribute__((externally_visible
)) void foo4 (void) { }
28 extern void foo5 (void) __attribute__((externally_visible
));
32 extern char *bar1
__attribute__((externally_visible
));
35 extern char *bar2
__attribute__((externally_visible
));
36 char *bar2
__attribute__((externally_visible
));
39 char *bar3
__attribute__((externally_visible
));
41 char *bar4
__attribute__((externally_visible
));
44 extern char *bar5
__attribute__((externally_visible
));