OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [warn/] [weak1.C] - Rev 301

Compare with Previous | Blame | View Log

// { 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* } { "*" } { "" } }
// 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;
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.