From: Giovanni Bajo Date: Thu, 26 Feb 2004 02:19:24 +0000 (+0000) Subject: re PR c++/14246 (Problems with templates, ice in write_template_arg_literal) X-Git-Tag: releases/gcc-4.0.0~9841 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=861a2c396326f8b15156b6ed2acea0e47c91985f;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 40bbebc8918e..b2df3d67d77d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-02-26 Giovanni Bajo + + PR c++/14246 + * g++.dg/other/crash-3.C: New test. + 2004-02-25 John David Anglin * 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 000000000000..d13821dee798 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/crash-3.C @@ -0,0 +1,31 @@ +// { dg-do compile } +// { dg-options "-g" } +// Contributed by: +// and Niall Douglas +// PR c++/14246: ice in write_template_arg_literal while mangling boolean +// expressions. + +namespace N1 { + + template + struct A { + enum { Yes = (sizeof(T) == 1) }; + }; + + template + struct B { + void foo(void); + }; + + template struct B< !A::Yes >; + +} + + +namespace N2 { + + template struct A {}; + A a; + +} +