re PR c++/38357 (ICE cc1plus (Segmentation fault))
authorSteve Ellcey <sje@cup.hp.com>
Thu, 15 Jan 2009 18:09:04 +0000 (18:09 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Thu, 15 Jan 2009 18:09:04 +0000 (18:09 +0000)
PR c++/38357
* g++.dg/template/crash87.C: New test.

From-SVN: r143403

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

index 0876ea0..f7c4833 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-15  Steve Ellcey  <sje@cup.hp.com>
+
+       PR c++/38357
+       * g++.dg/template/crash87.C: New test.
+
 2009-01-15  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR middle-end/37843
diff --git a/gcc/testsuite/g++.dg/template/crash87.C b/gcc/testsuite/g++.dg/template/crash87.C
new file mode 100644 (file)
index 0000000..7b8bf4a
--- /dev/null
@@ -0,0 +1,27 @@
+// Origin: PR c++/38357
+// { dg-do compile }
+
+class BUG
+{
+public:
+ bool name() { return true; }
+};
+
+template <bool T>
+struct BUG1_5
+{
+
+};
+
+template <bool name>
+class BUG2 : BUG
+{
+public:
+ typedef BUG1_5<name> ptr; // { dg-error "could not convert template argument" }
+};
+
+int main()
+{
+ BUG2<false> b;
+ return 0;
+}