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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [eh/] [weak1.C] - Blame information for rev 825

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// PR target/29487
2
// { dg-require-weak "" }
3
// { dg-do run { xfail "hppa*-hp-hpux11.*" } }
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
}

powered by: WebSVN 2.1.0

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