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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [eh/] [elide1.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/13944
2
 
3
// Bug: When eliding the copy from the A temporary into the exception
4
// object, we extended the throw prohibition to the constructor for the
5
// temporary.  This is wrong; the throw from A() should propagate normally
6
// regardless of the elision of the temporary.
7
 
8
// { dg-do run }
9
 
10
struct A
11
{
12
  A() { throw 0; }
13
};
14
 
15
int main()
16
{
17
  try
18
    {
19
      throw A();
20
    }
21
  catch(int i)
22
    {
23
      return i;
24
    }
25
  catch (...)
26
    {
27
      return 2;
28
    }
29
  return 3;
30
}

powered by: WebSVN 2.1.0

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