re PR c++/10079 (ICE (segfault) while substitute return type containing unresolved...
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>
Tue, 30 Dec 2003 21:42:39 +0000 (21:42 +0000)
committerVolker Reichelt <reichelt@gcc.gnu.org>
Tue, 30 Dec 2003 21:42:39 +0000 (21:42 +0000)
PR c++/10079
* g++.dg/template/crash16.C: New test.

From-SVN: r75246

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

index b21ed54..df74e49 100644 (file)
@@ -1,3 +1,8 @@
+2003-12-30  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       PR c++/10079
+       * g++.dg/template/crash16.C: New test.
+
 2003-12-30  Mark Mitchell  <mark@codesourcery.com>
 
        * g++.dg/abi/vbase10.C: XFAIL on arm*-*-*.
diff --git a/gcc/testsuite/g++.dg/template/crash16.C b/gcc/testsuite/g++.dg/template/crash16.C
new file mode 100644 (file)
index 0000000..f80dd10
--- /dev/null
@@ -0,0 +1,21 @@
+// { dg-do compile }
+// Origin: Alexander Stippler  <stip@mathematik.uni-ulm.de>
+// PR c++/10079
+
+template <bool> struct A {};
+
+template <typename> struct B
+{
+  enum { e };
+};
+
+template <typename T> A<(B<T>::e && 0)> foo(T) {}
+
+template <typename T> void foo(B<T>) {}
+
+void bar()
+{
+  B<int> b;
+  foo(b);
+}