From: Neil Booth Date: Thu, 2 Jan 2003 19:27:31 +0000 (+0000) Subject: * g++.dg/parse/parse6.C: New test. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f349fb24baf3b19478818c4849b7aeeed666ac0d;p=gcc.git * g++.dg/parse/parse6.C: New test. From-SVN: r60795 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ada2e5a2fd2..5e485480122 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2003-01-02 Neil Booth + + * g++.dg/parse/parse6.C: New test. + 2003-01-02 Kazu Hirata * gcc.dg/h8300-stack-1.c: New. diff --git a/gcc/testsuite/g++.dg/parse/parse6.C b/gcc/testsuite/g++.dg/parse/parse6.C new file mode 100644 index 00000000000..73f7256d3ca --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/parse6.C @@ -0,0 +1,31 @@ +/* PR c++/3012 */ +/* { dg-do compile } */ + +class A +{ + public: + + template + void foo() const + { + } +}; + +template +class B +{ + public: + + void bar(const A& a) const + { + // Compile used to fail with parse error before `;' token + a.foo(); + } +}; + +int main() +{ + A a; + B b; + b.bar(a); +}