aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGiovanni Bajo <giovannibajo@gcc.gnu.org>2004-02-26 02:19:24 +0000
committerGiovanni Bajo <giovannibajo@gcc.gnu.org>2004-02-26 02:19:24 +0000
commit861a2c396326f8b15156b6ed2acea0e47c91985f (patch)
tree78758f01de76983059aed9c4baaa23af48edbbce /gcc
parent3cc8f5878378f33c0f79929b993b0d0504fc5c50 (diff)
downloadgcc-861a2c396326f8b15156b6ed2acea0e47c91985f.zip
gcc-861a2c396326f8b15156b6ed2acea0e47c91985f.tar.gz
gcc-861a2c396326f8b15156b6ed2acea0e47c91985f.tar.bz2
re PR c++/14246 (Problems with templates, ice in write_template_arg_literal)
PR c++/14246 * g++.dg/other/crash-3.C: New test. From-SVN: r78479
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/other/crash-3.C31
2 files changed, 36 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 40bbebc..b2df3d6 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
+
+ PR c++/14246
+ * g++.dg/other/crash-3.C: New test.
+
2004-02-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* g++.dg/opt/inline4.C (dg-final): Robustify regexp.
diff --git a/gcc/testsuite/g++.dg/other/crash-3.C b/gcc/testsuite/g++.dg/other/crash-3.C
new file mode 100644
index 0000000..d13821d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/crash-3.C
@@ -0,0 +1,31 @@
+// { dg-do compile }
+// { dg-options "-g" }
+// Contributed by: <schmid at snake dot iap dot physik dot tu-darmstadt dot de>
+// and Niall Douglas <s_gccbugzilla at nedprod dot com>
+// PR c++/14246: ice in write_template_arg_literal while mangling boolean
+// expressions.
+
+namespace N1 {
+
+ template <typename T>
+ struct A {
+ enum { Yes = (sizeof(T) == 1) };
+ };
+
+ template<bool T>
+ struct B {
+ void foo(void);
+ };
+
+ template struct B< !A<int>::Yes >;
+
+}
+
+
+namespace N2 {
+
+ template<bool> struct A {};
+ A<!false> a;
+
+}
+