This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/34651] [4.3 Regression] ICE in set_value_range, at tree-vrp.c:321



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-01-09 16:31 -------
(gdb) up
#1  0x0000000000cf4cf2 in set_value_range (vr=0x7fff3e9f5f70, t=VR_RANGE, 
    min=0x2adb6c10ea80, max=0x2adb6ed76510, equiv=0x18ac910)
    at /space/rguenther/src/svn/trunk/gcc/tree-vrp.c:321
321           gcc_assert (cmp == 0 || cmp == -1 || cmp == -2);
(gdb) call debug_tree (max)
 <integer_cst 0x2adb6ed76510 type <boolean_type 0x2adb6c1b2540 Bool> constant
invariant -2>

huh.

Probably the VR extracted from

  inHotKey$Shift_120 = SR.658_119 & 0xfffffffffffffffffffffffffffffffe;

which contains a non-normalized integer constant.  Generated by SRA.

It's also an incredibly stupid initialization sequence.  Meh.

#0  build2_stat (code=BIT_AND_EXPR, tt=0x2b4fb8c8d540, arg0=0x2b4fbb850aa0, 
    arg1=0x2b4fbb851510) at /space/rguenther/src/svn/trunk/gcc/tree.c:3097
#1  0x0000000000914256 in fold_build2_stat (code=BIT_AND_EXPR, 
    type=0x2b4fb8c8d540, op0=0x2b4fbb850aa0, op1=0x2b4fbb851510)
    at /space/rguenther/src/svn/trunk/gcc/fold-const.c:13652
#2  0x0000000000ba0122 in sra_build_assignment (dst=0x2b4fbb850960, 
    src=0x2b4fbb853550) at /space/rguenther/src/svn/trunk/gcc/tree-sra.c:2233
#3  0x0000000000ba1600 in sra_build_bf_assignment (dst=0x2b4fbb8530f0, 
    src=0x2b4fbb853550) at /space/rguenther/src/svn/trunk/gcc/tree-sra.c:2392
#4  0x0000000000ba2d5a in sra_build_elt_assignment (elt=0x1521980, 
    src=0x2b4fbb853550) at /space/rguenther/src/svn/trunk/gcc/tree-sra.c:2548
#5  0x0000000000ba320b in generate_element_copy (dst=0x1521980, src=0x1521b10, 
    list_p=0x7ffff1f1d650)
    at /space/rguenther/src/svn/trunk/gcc/tree-sra.c:2631
#6  0x0000000000ba3162 in generate_element_copy (dst=0x15218e0, src=0x1521a70, 
    list_p=0x7ffff1f1d650)
    at /space/rguenther/src/svn/trunk/gcc/tree-sra.c:2622
#7  0x0000000000ba3162 in generate_element_copy (dst=0x15216b0, src=0x1521660, 
    list_p=0x7ffff1f1d650)
    at /space/rguenther/src/svn/trunk/gcc/tree-sra.c:2622
#8  0x0000000000ba78c1 in scalarize_copy (lhs_elt=0x15216b0, 
    rhs_elt=0x1521660, bsi=0x7ffff1f1d880)
    at /space/rguenther/src/svn/trunk/gcc/tree-sra.c:3341

The fact that sra_build_assignment builds the mask it uses _without_
truncating the integer constants(!) is bogus.  It looks like it should
perform the masking operation in a different type instead.

Or, why produce a mask operation at all here?


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aoliva at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34651


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]