diff options
| -rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
| -rw-r--r-- | gcc/testsuite/g++.dg/parse/parse6.C | 31 |
2 files changed, 35 insertions, 0 deletions
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 <neil@daikokuya.co.uk> + + * g++.dg/parse/parse6.C: New test. + 2003-01-02 Kazu Hirata <kazu@cs.umass.edu> * 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 <class T> + void foo() const + { + } +}; + +template <class T> +class B +{ + public: + + void bar(const A& a) const + { + // Compile used to fail with parse error before `;' token + a.foo<double>(); + } +}; + +int main() +{ + A a; + B<int> b; + b.bar(a); +} |
