re PR c++/7982 (core dump due to recursive definition (using stl set))
authorKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
Sun, 23 Feb 2003 14:10:50 +0000 (14:10 +0000)
committerKriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org>
Sun, 23 Feb 2003 14:10:50 +0000 (14:10 +0000)
PR c++/7982
* g++.dg/warn/implicit-typename1.C: New test.

From-SVN: r63318

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/implicit-typename1.C [new file with mode: 0644]

index 7997b3a2cb1eaeb65cf632a1aadc1fba82eb4b29..73d1f2d23c3e5616028e5b96405c17137e07525b 100644 (file)
@@ -1,3 +1,8 @@
+2003-02-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       PR c++/7982
+       * g++.dg/warn/implicit-typename1.C: New test.
+
 2003-02-22  Kelley Cook <kelleycook@comcast.net>
 
         * g++.old-deja/g++.other/store-expr1.C: Replace "mcpu" 
diff --git a/gcc/testsuite/g++.dg/warn/implicit-typename1.C b/gcc/testsuite/g++.dg/warn/implicit-typename1.C
new file mode 100644 (file)
index 0000000..ab5587e
--- /dev/null
@@ -0,0 +1,17 @@
+// The -pedantic option must be omitted to trigger the crash.
+// { dg-do compile }
+// { dg-options "" }
+
+// PR c++/7982: Crash warning about implicit typename.
+// The base class refers to another typename, while the
+// name lookup finds a template.
+
+template <typename T> struct X {};
+
+template <typename T> struct C {
+  typedef typename T::X X;
+};
+
+template <typename T> struct A : public C<T> {
+  typedef X<int> X; // { dg-warning "lookup|dependent base|typename" }
+};