diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/virtual10.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/virtual10.C | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/virtual10.C b/gcc/testsuite/g++.old-deja/g++.other/virtual10.C new file mode 100644 index 000000000..ba3dea700 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/virtual10.C @@ -0,0 +1,20 @@ +// { dg-do assemble } + +// Copyright (C) 2000 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 14 Nov 2000 <nathan@codesourcery.com> + +// We failed to spot a static member which overrode a virtual + +struct A +{ + virtual int foo (char); + static int foo (); + virtual int foo (int); // { dg-error "" } this function + static int foo (float); + virtual int foo (double); +}; + +struct B : A +{ + static int foo (int); // { dg-error "" } cannot override +}; |