diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/inherit/base1.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/inherit/base1.C | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/inherit/base1.C b/gcc-4.9/gcc/testsuite/g++.dg/inherit/base1.C new file mode 100644 index 000000000..952c6d20f --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/inherit/base1.C @@ -0,0 +1,22 @@ +// { dg-do compile } +// { dg-options "-pedantic-errors -w" } + +// Copyright (C) 2000 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 29 Nov 2001 <nathan@nathan@codesourcery.com> + +// PR 164 +// Although a direct base can be inaccessible due to ambiguity, that +// should not blow up synthesized methods. + +struct A {int m;}; +struct B : A {int m;}; +struct C : virtual A, B {int m;}; +struct D : B, C {int m;}; + +void foo2 () +{ + D d; + D e (d); + + e = d; +} |