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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/8186
2
 
3
// Bug: In f, convert_for_arg_passing wrapped the A TARGET_EXPR in an
4
// ADDR_EXPR for passing by invisible ref.  stabilize_throw_expr copied the
5
// resulting pointer into a temporary.  cp_convert_parm_for_inlining then
6
// dereferences it and tries to initialize B::am with the INDIRECT_REF,
7
// which calls for a bitwise copy.  Which is broken.
8
 
9
// { dg-options "-O" }
10
 
11
struct A
12
{
13
  A();
14
  A(const A&);
15
  A& operator=(const A&);
16
};
17
 
18
struct B {
19
  A am;
20
  B(A a) { am = a; }
21
};
22
 
23
void f ()
24
{
25
  throw B(A());
26
}

powered by: WebSVN 2.1.0

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