Bug#318932: g++-4.0: [PR 22551] ICE in tree_low_cst, at tree.c:3843
Package: g++-4.0
Version: 4.0.1-2
Severity: important
See http://gcc.gnu.org/PR22551
I came across this while compiling pose on AMD64 (I am not sure it
will work eventually...). No problem with g++-3.4.
command line:
$ g++-4.0 -c testcase.cppoutput:
testcase.cpp: In function 'int main(value_type)':
testcase.cpp:12: warning: overflow in implicit constant conversion
testcase.cpp:13: warning: overflow in implicit constant conversion
testcase.cpp:14: warning: overflow in implicit constant conversion
testcase.cpp:15: warning: overflow in implicit constant conversion
testcase.cpp:16: warning: overflow in implicit constant conversion
testcase.cpp:10: internal compiler error: in tree_low_cst, at
tree.c:3843
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.0/README.Bugs>.
--testcase.cpp--
typedef int value_type;
const value_type b = 0x80000000;
const value_type e1 = b + 1;
const value_type e2 = b + 2;
const value_type e3 = b + 3;
const value_type e4 = b + 4;
const value_type e5 = b + 5;
int main (value_type error)
{
switch (error)
{
case e1: return 0;
case e2: return 0;
case e3: return 0;
case e4: return 0;
case e5: return 0;
}
}
--testcase.cpp--
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12.2-skas3-v8-barsoom64
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages g++-4.0 depends on:
ii gcc-4.0 4.0.1-2 The GNU C compiler
ii gcc-4.0-base 4.0.1-2 The GNU Compiler Collection (base
ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an
ii libstdc++6-4.0-dev 4.0.1-2 The GNU Standard C++ Library v3 (d
g++-4.0 recommends no packages.
-- no debconf information
Reply to: