OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.brendan/] [copy7.C] - Blame information for rev 305

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

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do run  }
2
// GROUPS passed copy-ctors
3
extern "C" int printf (const char *, ...);
4
extern "C" void exit (int);
5
 
6
void die () { printf ("FAIL\n"); exit (1); }
7
 
8
class B {
9
public:
10
  B() {}
11
  B(const B &) { printf ("PASS\n"); exit (0); }
12
private:
13
    int x;
14
};
15
 
16
class A : public B {
17
public:
18
    A() {}
19
 
20
  A(const B &) { printf ("FAIL\n"); exit (1); }
21
};
22
 
23
int
24
main()
25
{
26
    A a;
27
    A b(a);
28
 
29
    printf ("FAIL\n");
30
    return 1;
31
}

powered by: WebSVN 2.1.0

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