This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/38572] [4.4 Regression] ICE in set_value_range, at tree-vrp.c:398
- From: "hjl dot tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Dec 2008 01:40:45 -0000
- Subject: [Bug middle-end/38572] [4.4 Regression] ICE in set_value_range, at tree-vrp.c:398
- References: <bug-38572-5606@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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