Home | History | Annotate | Download | only in jni
      1 // PR target/29487
      2 // { dg-do run { xfail { hppa*-*-hpux* && { ! hppa*64*-*-* } } } }
      3 // { dg-require-weak-override "" }
      4 // { dg-additional-sources "weak1-a.cc" }
      5 // { dg-options "-O2" }
      6 
      7 extern __attribute__((weak))
      8 void f() {
      9 }
     10 
     11 int main () {
     12   try {
     13     f();
     14     return 1;
     15   } catch (int i) {
     16     /* Although the implementation of f in this file does not throw
     17        any exceptions, it is weak, and may therefore be replaced at
     18        link time.  Therefore, the compiler must not optimize away this
     19        catch clause.  */
     20     if (i != 7)
     21       return 2;
     22   }
     23 }
     24