1 /* Test for #pragma weak with declaration not at file scope. */
2 /* { dg-do compile } */
3 /* { dg-require-weak "" } */
4 /* { dg-options "" } */
5 /* NVPTX's weak is applied to the definition, not declaration. */
6 /* { dg-skip-if "" { nvptx-*-* } } */
7
8 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?foo" } } */
9
10 #pragma weak foo
11
12 int
13 main (void)
14 {
15 extern int foo (void);
16 if (&foo)
17 return foo ();
18 return 0;
19 }