mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-08 09:26:58 +08:00
* g++.old-deja/g++.other/ambig3.C: New test.
From-SVN: r34710
This commit is contained in:
parent
0e997e7650
commit
ed18e47e18
@ -1,3 +1,7 @@
|
|||||||
|
2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
|
||||||
|
|
||||||
|
* g++.old-deja/g++.other/ambig3.C: New test.
|
||||||
|
|
||||||
2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
|
2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
|
||||||
|
|
||||||
* g++.old-deja/g++.pt/syntax1.C: New test.
|
* g++.old-deja/g++.pt/syntax1.C: New test.
|
||||||
|
34
gcc/testsuite/g++.old-deja/g++.other/ambig3.C
Normal file
34
gcc/testsuite/g++.old-deja/g++.other/ambig3.C
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
// Build don't link:
|
||||||
|
|
||||||
|
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||||
|
// Contributed by Nathan Sidwell 23 June 2000 <nathan@codesourcery.com>
|
||||||
|
|
||||||
|
// Origin GNATS bug report 69 from Glenn Ammons <ammons@cs.wisc.edu>
|
||||||
|
//
|
||||||
|
// A base which derives a virtual base hides declarations in the virtual base,
|
||||||
|
// even if that virtual base is accessible via another path [10.2]/6. Make
|
||||||
|
// sure that non-virtual bases of the virtual base are also hidden, not matter
|
||||||
|
// what order bases are declared in.
|
||||||
|
|
||||||
|
struct A {int a;};
|
||||||
|
struct B : A {};
|
||||||
|
|
||||||
|
struct L1 : virtual B { int a; };
|
||||||
|
struct L2 : virtual A { int a; };
|
||||||
|
|
||||||
|
struct R1 : virtual B {};
|
||||||
|
struct R2 : virtual A {};
|
||||||
|
|
||||||
|
struct C1 : R1, L1 {};
|
||||||
|
struct C2 : R2, L2 {};
|
||||||
|
|
||||||
|
struct D1 : L1, R1 {};
|
||||||
|
struct D2 : L2, R2 {};
|
||||||
|
|
||||||
|
void fn (C1 *c1, D1 *d1, C2 *c2, D2 *d2)
|
||||||
|
{
|
||||||
|
c1->a = 1;
|
||||||
|
d1->a = 1;
|
||||||
|
c2->a = 1;
|
||||||
|
d2->a = 1;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user