'gcc-3_4-branch'.
From-SVN: r91868
--- /dev/null
+// { dg-do compile }
+
+// Origin: Volker Reichelt <reichelt@gcc.gnu.org>
+
+// PR c++/18100: Invalid nested type.
+
+struct A
+{
+ template<int> struct A {}; // { dg-error "same name" }
+};
+
+A::A<0> a; // { dg-error "not a template" }
--- /dev/null
+// Copyright (C) 2004 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 7 Dec 2004 <nathan@codesourcery.com>
+
+// PR 18803: reject legal
+// Origin: Wolfgang Bangerth <bangerth@dealii.org>
+
+struct A {
+ int operator() ();
+};
+
+template <int> void foo () {
+ A &a = *new A();
+ const int i = a();
+}