http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54689
Bug #: 54689 Summary: sparseset.h:147 Conditional jump or move depends on uninitialised value(s) Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassig...@gcc.gnu.org ReportedBy: dim...@gmail.com GNU C++ (GCC) version 4.8.0 20120923 (experimental) [trunk revision 191649] (x86_64-unknown-linux-gnu) $ cat undef_sparseset_h.ii class A { int f() const; }; int A::f() const {} $ LANG=C valgrind --track-origins=yes --num-callers=24 /usr/local/gcc_current/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/cc1plus -v -fpreprocessed undef_sparseset_h.ii -quiet -march=x86-64 -o iiii -version ==19291== Memcheck, a memory error detector ==19291== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al. ==19291== Using Valgrind-3.9.0.SVN and LibVEX; rerun with -h for copyright info ==19291== Command: /usr/local/gcc_current/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/cc1plus -v -fpreprocessed undef_sparseset_h.ii -quiet -march=x86-64 -o iiii -version ==19291== GNU C++ (GCC) version 4.8.0 20120923 (experimental) [trunk revision 191649] (x86_64-unknown-linux-gnu) compiled by GNU C version 4.8.0 20120923 (experimental) [trunk revision 191649], GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 ignoring nonexistent directory "/usr/local/gcc_current/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../x86_64-unknown-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/local/gcc_current/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include/c++ /usr/local/gcc_current/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include/c++/x86_64-unknown-linux-gnu /usr/local/gcc_current/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include/c++/backward /usr/local/gcc_current/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include /usr/local/include /usr/local/gcc_current/include /usr/local/gcc_current/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include-fixed /usr/include End of search list. GNU C++ (GCC) version 4.8.0 20120923 (experimental) [trunk revision 191649] (x86_64-unknown-linux-gnu) compiled by GNU C version 4.8.0 20120923 (experimental) [trunk revision 191649], GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: fc0afb1edaeae797a870fb2622727189 ==19291== Conditional jump or move depends on uninitialised value(s) ==19291== at 0x92D0FD: mark_pseudo_regno_live(int) (sparseset.h:147) ==19291== by 0x92E11C: process_bb_node_lives(ira_loop_tree_node*) (ira-lives.c:1326) ==19291== by 0x9161FA: ira_traverse_loop_tree(bool, ira_loop_tree_node*, void (*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*)) (ira-build.c:1495) ==19291== by 0x92ECA1: ira_create_allocno_live_ranges() (ira-lives.c:1591) ==19291== by 0x9188C4: ira_build() (ira-build.c:3093) ==19291== by 0x911D7E: rest_of_handle_ira() (ira.c:4223) ==19291== by 0x97F20C: execute_one_pass(opt_pass*) (passes.c:2199) ==19291== by 0x97F5C4: execute_pass_list(opt_pass*) (passes.c:2254) ==19291== by 0x97F5D6: execute_pass_list(opt_pass*) (passes.c:2255) ==19291== by 0x7815F7: expand_function(cgraph_node*) (cgraphunit.c:1601) ==19291== by 0x783771: compile() (cgraphunit.c:1794) ==19291== by 0x783A94: finalize_compilation_unit() (cgraphunit.c:2080) ==19291== by 0x5B03DA: cp_write_global_declarations() (decl2.c:4024) ==19291== by 0xA1E444: compile_file() (toplev.c:560) ==19291== by 0xA20019: toplev_main(int, char**) (toplev.c:1863) ==19291== by 0x38E3421734: (below main) (libc-start.c:226) ==19291== Uninitialised value was created by a heap allocation ==19291== at 0x480871C: malloc (vg_replace_malloc.c:270) ==19291== by 0xF08587: xmalloc (xmalloc.c:147) ==19291== by 0xA0814F: sparseset_alloc(unsigned long) (sparseset.c:33) ==19291== by 0x92EC2F: ira_create_allocno_live_ranges() (ira-lives.c:1583) ==19291== by 0x9188C4: ira_build() (ira-build.c:3093) ==19291== by 0x911D7E: rest_of_handle_ira() (ira.c:4223) ==19291== by 0x97F20C: execute_one_pass(opt_pass*) (passes.c:2199) ==19291== by 0x97F5C4: execute_pass_list(opt_pass*) (passes.c:2254) ==19291== by 0x97F5D6: execute_pass_list(opt_pass*) (passes.c:2255) ==19291== by 0x7815F7: expand_function(cgraph_node*) (cgraphunit.c:1601) ==19291== by 0x783771: compile() (cgraphunit.c:1794) ==19291== by 0x783A94: finalize_compilation_unit() (cgraphunit.c:2080) ==19291== by 0x5B03DA: cp_write_global_declarations() (decl2.c:4024) ==19291== by 0xA1E444: compile_file() (toplev.c:560) ==19291== by 0xA20019: toplev_main(int, char**) (toplev.c:1863) ==19291== by 0x38E3421734: (below main) (libc-start.c:226) ==19291== ==19291== Conditional jump or move depends on uninitialised value(s) ==19291== at 0x92CFDA: make_object_born(ira_object*) (sparseset.h:147) ==19291== by 0x92D11A: mark_pseudo_regno_live(int) (ira-lives.c:295) ==19291== by 0x92E11C: process_bb_node_lives(ira_loop_tree_node*) (ira-lives.c:1326) ==19291== by 0x9161FA: ira_traverse_loop_tree(bool, ira_loop_tree_node*, void (*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*)) (ira-build.c:1495) ==19291== by 0x92ECA1: ira_create_allocno_live_ranges() (ira-lives.c:1591) ==19291== by 0x9188C4: ira_build() (ira-build.c:3093) ==19291== by 0x911D7E: rest_of_handle_ira() (ira.c:4223) ==19291== by 0x97F20C: execute_one_pass(opt_pass*) (passes.c:2199) ==19291== by 0x97F5C4: execute_pass_list(opt_pass*) (passes.c:2254) ==19291== by 0x97F5D6: execute_pass_list(opt_pass*) (passes.c:2255) ==19291== by 0x7815F7: expand_function(cgraph_node*) (cgraphunit.c:1601) ==19291== by 0x783771: compile() (cgraphunit.c:1794) ==19291== by 0x783A94: finalize_compilation_unit() (cgraphunit.c:2080) ==19291== by 0x5B03DA: cp_write_global_declarations() (decl2.c:4024) ==19291== by 0xA1E444: compile_file() (toplev.c:560) ==19291== by 0xA20019: toplev_main(int, char**) (toplev.c:1863) ==19291== by 0x38E3421734: (below main) (libc-start.c:226) ==19291== Uninitialised value was created by a heap allocation ==19291== at 0x480871C: malloc (vg_replace_malloc.c:270) ==19291== by 0xF08587: xmalloc (xmalloc.c:147) ==19291== by 0xA0814F: sparseset_alloc(unsigned long) (sparseset.c:33) ==19291== by 0x92EC2F: ira_create_allocno_live_ranges() (ira-lives.c:1583) ==19291== by 0x9188C4: ira_build() (ira-build.c:3093) ==19291== by 0x911D7E: rest_of_handle_ira() (ira.c:4223) ==19291== by 0x97F20C: execute_one_pass(opt_pass*) (passes.c:2199) ==19291== by 0x97F5C4: execute_pass_list(opt_pass*) (passes.c:2254) ==19291== by 0x97F5D6: execute_pass_list(opt_pass*) (passes.c:2255) ==19291== by 0x7815F7: expand_function(cgraph_node*) (cgraphunit.c:1601) ==19291== by 0x783771: compile() (cgraphunit.c:1794) ==19291== by 0x783A94: finalize_compilation_unit() (cgraphunit.c:2080) ==19291== by 0x5B03DA: cp_write_global_declarations() (decl2.c:4024) ==19291== by 0xA1E444: compile_file() (toplev.c:560) ==19291== by 0xA20019: toplev_main(int, char**) (toplev.c:1863) ==19291== by 0x38E3421734: (below main) (libc-start.c:226) ==19291== ==19291== ==19291== HEAP SUMMARY: ==19291== in use at exit: 352,134 bytes in 1,987 blocks ==19291== total heap usage: 3,683 allocs, 1,696 frees, 1,469,244 bytes allocated ==19291== ==19291== LEAK SUMMARY: ==19291== definitely lost: 1,452 bytes in 73 blocks ==19291== indirectly lost: 0 bytes in 0 blocks ==19291== possibly lost: 16,064 bytes in 2 blocks ==19291== still reachable: 334,618 bytes in 1,912 blocks ==19291== suppressed: 0 bytes in 0 blocks ==19291== Rerun with --leak-check=full to see details of leaked memory ==19291== ==19291== For counts of detected and suppressed errors, rerun with: -v ==19291== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 2 from 2)