http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00110.html
[official-gcc.git] / gcc / testsuite / g++.dg / warn / weak1.C
blob8802a8fe8cd2e84c5fa5d2cadace433217e58f3f
1 // { dg-do run }
2 // { dg-require-weak "" }
3 // The PA HP-UX dynamic loader doesn't support unsatisfied weak symbols.
4 // { dg-skip-if "No unsat" { hppa*-*-hpux* } { "*" } { "" } }
5 // The darwin loader does, but they do need to exist at link time.
6 // { dg-skip-if "No link unsat" { *-*-darwin* } { "*" } { "" } }
8 extern void foo (void) __attribute__ ((weak));
10 int
11 main ()
13   if (&foo)
14     foo ();
16   return 0;