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/18089] New: Valgrind errors in real.c


During an --enable-checking=valgrind (and the normal checks) bootstrap, stage2
gives warnings compiling ggc-common.c.  The first one is:
==29462== Conditional jump or move depends on uninitialised value(s)
==29462==    at 0x853CB22: do_fix_trunc (real.c:963)

963           if (REAL_EXP (r) <= 0)

(gdb) bt
#0  0x0853cb22 in do_fix_trunc (r=0x52bfd9cc, a=0x52bfd9b4) at
/home/drow/src/gcc/gcc/real.c:963
#1  0x0853e1be in real_trunc (r=0x52bfd9b4, mode=VOIDmode, x=0x7) at
/home/drow/src/gcc/gcc/real.c:4610
#2  0x0825fcaf in fold_convert_const (code=FIX_TRUNC_EXPR, type=0x1bb93488,
arg1=0x1c194a80)
    at /home/drow/src/gcc/gcc/fold-const.c:1754
#3  0x080f9a0b in evaluate_stmt (stmt=Variable "stmt" is not available.
) at /home/drow/src/gcc/gcc/tree-ssa-ccp.c:853
#4  0x080fa0a8 in ccp_visit_stmt (stmt=0x1c191f54, taken_edge_p=0x7,
output_p=0x4000007)
    at /home/drow/src/gcc/gcc/tree-ssa-ccp.c:1065
#5  0x08146f48 in simulate_stmt (stmt=0x1c191f54) at
/home/drow/src/gcc/gcc/tree-ssa-propagate.c:306
#6  0x081474f0 in ssa_propagate (visit_stmt=0x4000007, visit_phi=0x4000007)
    at /home/drow/src/gcc/gcc/tree-ssa-propagate.c:429
#7  0x080fa77c in execute_ssa_ccp () at /home/drow/src/gcc/gcc/tree-ssa-ccp.c:1207

The code being compiled is the check of min_expand.  It looks like stage1 has
miscompiled stage2, because do_fix_trunc starts by copying *r to *a, but at this
read of *r r->uexp is still undefined.  That's just a guess.

Compiler is: GNU C version 4.0.0 20041012 (it took three days and a bit to do
the valgrind bootstrap).

-- 
           Summary: Valgrind errors in real.c
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: drow at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


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


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