Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/warn/weak1.C @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// { dg-do run } // { dg-require-weak "" } // The PA HP-UX dynamic loader doesn't support unsatisfied weak symbols. // { dg-skip-if "No unsat" { hppa*-*-hpux* } } // { dg-skip-if "No weak unsat" { *-*-aix* } } // The darwin loader does, but they do need to exist at link time. // { dg-skip-if "No link unsat" { *-*-darwin* } } // For kernel modules and static RTPs, the loader treats undefined weak // symbols in the same way as undefined strong symbols. The test // therefore fails to load, so skip it. // { dg-skip-if "" { "*-*-vxworks*" && nonpic } "*" { "-non-static" } } extern void foo (void) __attribute__ ((weak)); int main () { if (&foo) foo (); return 0; }