(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
special/
weak-2.c
       1  /* { dg-do run } */
       2  /* { dg-require-weak "" } */
       3  /* { dg-additional-sources "weak-2a.c weak-2b.c" } */
       4  
       5  /* NVPTX's implementation of weak is broken when a strong symbol is in
       6     a later object file than the weak definition.   */
       7  /* { dg-skip-if "" { "nvptx-*-*" } } */
       8  
       9  #include <stdlib.h>
      10  
      11  extern int foo(void);
      12  
      13  int main(void) {
      14  
      15      if (foo())
      16          exit(0);
      17      else
      18          abort();
      19  }