re PR c++/8164 (ICE when using different const expressions as template parameter)
authorMark Mitchell <mark@codesourcery.com>
Fri, 11 Jul 2003 08:53:59 +0000 (08:53 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Fri, 11 Jul 2003 08:53:59 +0000 (08:53 +0000)
PR c++/8164
* decl.c (duplicate_decls): Avoid mangling names unnecessarily.

PR c++/8164
* g++.dg/template/nontype2.C: New test.

PR c++/10558
* g++.dg/parse/template8.C: New test.

From-SVN: r69229

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

index 661f960d775b5c5220bf12dff3fdfe1a69aa5bfb..a43e933517574cfbc33a8a1427b94919fbf705a1 100644 (file)
@@ -1,5 +1,8 @@
 2003-07-11  Mark Mitchell  <mark@codesourcery.com>
 
+       PR c++/8164
+       * g++.dg/template/nontype2.C: New test.
+
        PR c++/10558
        * g++.dg/parse/template8.C: New test.
 
diff --git a/gcc/testsuite/g++.dg/template/nontype2.C b/gcc/testsuite/g++.dg/template/nontype2.C
new file mode 100644 (file)
index 0000000..fe7e715
--- /dev/null
@@ -0,0 +1,11 @@
+template <bool> struct A {};
+template <bool> struct B
+{
+  void foo()
+  {
+    const int i=0;
+    typedef A< i<=1 > C;
+    typedef A< i<=2 > C;
+  }
+};