This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/23481] New: [4.1 regression] ICE with long int and sizeof in template
- 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: 19 Aug 2005 14:27:06 -0000
- Subject: [Bug c++/23481] New: [4.1 regression] ICE with long int and sizeof in template
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code snippet causes a segfault in fold-const.c on mainline:
=========================================================
template<typename T> bool foo()
{
const long int i = sizeof(T) > 1 ? sizeof(T) : 0;
return i > 0;
}
=========================================================
Maybe a front-end or a middle-end issue.
--
Summary: [4.1 regression] ICE with long int and sizeof in
template
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, monitored
Severity: critical
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23481