]> gcc.gnu.org Git - gcc.git/commitdiff
* g++.dg/parse/parse6.C: New test.
authorNeil Booth <neil@daikokuya.co.uk>
Thu, 2 Jan 2003 19:27:31 +0000 (19:27 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Thu, 2 Jan 2003 19:27:31 +0000 (19:27 +0000)
From-SVN: r60795

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/parse6.C [new file with mode: 0644]

index ada2e5a2fd20826bdb6fec7d1e03dc9f94f6602a..5e485480122d2f0d5042586986a484349c6dd78c 100644 (file)
@@ -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 (file)
index 0000000..73f7256
--- /dev/null
@@ -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);
+}
This page took 0.074149 seconds and 5 git commands to generate.