[Bug c++/28337] New: [4.0/4.1/4.2 regression] ICE with string literals in templates
reichelt at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Jul 11 09:33:00 GMT 2006
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
More information about the Gcc-bugs
mailing list