diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/local3.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/local3.C | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/local3.C b/gcc/testsuite/g++.old-deja/g++.other/local3.C new file mode 100644 index 000000000..3879b141d --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/local3.C @@ -0,0 +1,17 @@ +// { dg-do run } +// Bug: g++ lies about DECL_CONTEXT, so the backend thinks B::f is not +// function-local. +// Contributed by Jason Merrill <jason@cygnus.com> + +struct A { + virtual void f () = 0; +}; + +int main() +{ + struct B : public A { + void f () { } + }; + + B b; +} |