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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [tc1/] [dr20.C] - Blame information for rev 307

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

Line No. Rev Author Line
1 301 jeremybenn
// { dg-do run }
2
// Origin: Giovanni Bajo 
3
// DR20: Some clarifications needed for 12.8 para 15
4
 
5
extern "C" void printf(const char*, ...);
6
extern "C" void abort(void);
7
 
8
int count = 0;
9
 
10
class Thing {
11
public:
12
  Thing() {
13
  }
14
  ~Thing() {
15
  }
16
  Thing(const Thing&)
17
  {
18
    count += 1;
19
  }
20
};
21
 
22
Thing f() {
23
  Thing t;
24
  return t;
25
}
26
 
27
int main(void)
28
{
29
  Thing t2 = f();
30
  printf("%d %x\n", count, &t2);
31
  if (count != 0)
32
    abort();
33
  return 0;
34
}

powered by: WebSVN 2.1.0

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