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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [defarg9.C] - Blame information for rev 749

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

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
//
3
// Copyright (C) 2001 Free Software Foundation, Inc.
4
// Contributed by Nathan Sidwell 24 April 2001 
5
 
6
// Bug 2608. A default parameter introduced in the definition of a
7
// ctor never made it into the clones, leading to later overload
8
// resolution failures. This is related to bug 2356.
9
 
10
struct A
11
{
12
  A (int, int);
13
};
14
 
15
A::A (int d, int = 0)
16
{
17
  if (d)
18
    {
19
      A a (0);
20
    }
21
}
22
 
23
void get_width ()
24
{
25
  A a (1);
26
}
27
 
28
struct B : A
29
{
30
  B ();
31
};
32
B::B ()
33
  :A (1)
34
{
35
}
36
 
37
struct C : virtual A
38
{
39
  C (int, int);
40
};
41
C::C (int, int = 0)
42
  :A (1)
43
{
44
}
45
struct D: C
46
{
47
  D ();
48
};
49
D::D ()
50
  :A (0), C (0)
51
{
52
}

powered by: WebSVN 2.1.0

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