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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [compat/] [init/] [elide1_main.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// Test that the destructor for a temporary passed by value isn't run
2
// until end of full-expression, as per [class.copy]:
3
 
4
// Whenever a temporary class object is copied using a copy  constructor,
5
// and  this  object  and  the copy have the same cv-unqualified type, an
6
// implementation is permitted to treat the original and the copy as  two
7
// different  ways of referring to the same object and not perform a copy
8
// at all, even if the class copy constructor  or  destructor  have  side
9
// effects....                                       In these cases,  the
10
// object  is  destroyed  at the later of times when the original and the
11
// copy would have been destroyed without the optimization.
12
 
13
// Here, the temporary would be destroyed later than the parm, so either we
14
// must suppress the optimization in this case or destroy value parms in the
15
// caller.
16
 
17
// Split into pieces for binary compatibility testing October 2002
18
 
19
extern void elide1_x (void);
20
 
21
int
22
main ()
23
{
24
  elide1_x ();
25
}

powered by: WebSVN 2.1.0

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