[Bug middle-end/38572] [4.4 Regression] ICE in set_value_range, at tree-vrp.c:398
hjl dot tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Dec 19 01:42:00 GMT 2008
------- Comment #16 from hjl dot tools at gmail dot com 2008-12-19 01:40 -------
C compiler doesn't crash:
(gdb) f 0
#0 set_value_range (vr=0x15e7bf40, t=VR_RANGE, min=0x2af40ef86fc0,
max=0x2af40ef86fc0, equiv=0x0) at ../../src/gcc/tree-vrp.c:398
398 gcc_assert (cmp == 0 || cmp == -1 || cmp == -2);
(gdb) call debug_tree (min)
<integer_cst 0x2af40ef86fc0 type <enumeral_type 0x2af40ef776c0 JSOp> constant
256>
(gdb) call debug_tree (max)
<integer_cst 0x2af40ef86fc0 type <enumeral_type 0x2af40ef776c0 JSOp> constant
256>
(gdb) p cmp
$4 = 0
(gdb)
C++ compiler crashes:
(gdb) f 1
#1 0x0000000000c9b2a5 in set_value_range (vr=0x2f069e0, t=VR_RANGE,
min=0x2ac27d43b330, max=0x2ac27d429ab0, equiv=0x0)
at ../../src/gcc/tree-vrp.c:398
398 gcc_assert (cmp == 0 || cmp == -1 || cmp == -2);
(gdb) call debug_tree (min)
<integer_cst 0x2ac27d43b330 type <enumeral_type 0x2ac27d433cc0 JSOp> constant
256>
(gdb) call debug_tree (max)
<integer_cst 0x2ac27d429ab0 type <enumeral_type 0x2ac27d433cc0 JSOp> constant
7>
(gdb) p cmp
$2 = 1
(gdb)
Enum looks different in C++.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38572
More information about the Gcc-bugs
mailing list