From f349fb24baf3b19478818c4849b7aeeed666ac0d Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Thu, 2 Jan 2003 19:27:31 +0000 Subject: * g++.dg/parse/parse6.C: New test. From-SVN: r60795 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/g++.dg/parse/parse6.C | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 gcc/testsuite/g++.dg/parse/parse6.C (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ada2e5a..5e48548 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 0000000..73f7256 --- /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); +} -- cgit v1.1