aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.co.uk>2003-01-02 19:27:31 +0000
committerNeil Booth <neil@gcc.gnu.org>2003-01-02 19:27:31 +0000
commitf349fb24baf3b19478818c4849b7aeeed666ac0d (patch)
treecfe5630404607cfa427437184cf3e6b14da7dd16
parentbf16e745821d984a2708894cee19f74d3eaf3f8e (diff)
downloadgcc-f349fb24baf3b19478818c4849b7aeeed666ac0d.zip
gcc-f349fb24baf3b19478818c4849b7aeeed666ac0d.tar.gz
gcc-f349fb24baf3b19478818c4849b7aeeed666ac0d.tar.bz2
* g++.dg/parse/parse6.C: New test.
From-SVN: r60795
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/g++.dg/parse/parse6.C31
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);
+}