2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.law / temps3.C
blob401b00661c035db0b4f5949a0a2a1582d73d7f56
1 // { dg-do run  }
2 // GROUPS passed temps
3 // temps file
4 // Message-Id: <9308231535.AA19432@geant.cenatls.cena.dgac.fr>
5 // From: chatty@geant.cenatls.cena.dgac.fr (Stephane CHATTY)
6 // Subject: g++ 2.4.5 does not destroy temporaries
7 // Date: Mon, 23 Aug 93 17:35:34 +0200
9 #include <stdio.h>
11 class A {
12 public:
13         int a;
14         A (int i) : a (i) { ;}
15         A (const A& aa) : a (aa.a) { ;}
16         ~A () { printf ("PASS\n");; }
20 foo ()
22         return A (10);
25 int main ()
27         int x = foo ().a;