This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28337] New: [4.0/4.1/4.2 regression] ICE with string literals in templates
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jul 2006 09:33:25 -0000
- Subject: [Bug c++/28337] New: [4.0/4.1/4.2 regression] ICE with string literals in templates
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following valid code snippet triggers an ICE since GCC 4.0.0:
==============================
template<int> void foo()
{
(0 ? "" : "X")+1;
}
==============================
bug.cc: In function 'void foo()':
bug.cc:3: internal compiler error: in fold_convert, at fold-const.c:2018
Please submit a full bug report, [etc.]
Without the template or if both string literals have the same length,
the code compiles fine.
--
Summary: [4.0/4.1/4.2 regression] ICE with string literals in
templates
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, monitored
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28337