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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr49115.C] - Blame information for rev 801

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do run }
2
 
3
extern "C" void abort (void);
4
struct MyException {};
5
struct Data {
6
    int nr;
7
    Data() : nr(66) {}
8
};
9
Data __attribute__((noinline,noclone)) getData(int i)
10
{
11
  if (i) throw MyException();
12
  Data data;
13
  data.nr = i;
14
  return data;
15
}
16
int main(int, char **)
17
{
18
  Data data;
19
  try {
20
      data = getData(1);
21
  } catch (MyException& e) {
22
      if (data.nr != 66)
23
        abort ();
24
  }
25
}

powered by: WebSVN 2.1.0

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