https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88478
Bug ID: 88478 Summary: valgrind error in cselib_record_sets Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- For this C++ code: struct a { bool b; int second; template < typename c, typename d > a(c, d) {} }; enum f {}g; a h() { return a(false, g); } compiled by a valgrind version of recent gcc trunk and compiler flag -O2, does this: $ ~/gcc/results/bin/gcc -c -O2 bug490.cc ==9146== Conditional jump or move depends on uninitialised value(s) ==9146== at 0x823414: cselib_record_sets(rtx_insn*) (cselib.c:2619) ==9146== by 0x82581F: cselib_process_insn(rtx_insn*) (cselib.c:2791) ==9146== by 0x12903FF: dse_step1 (dse.c:2660) ==9146== by 0x12903FF: rest_of_handle_dse (dse.c:3576) $ ~/gcc/results/bin/gcc -v Using built-in specs. COLLECT_GCC=/home/dcb/gcc/results/bin/gcc COLLECT_LTO_WRAPPER=/home/dcb/gcc/results.267000.valgrind/libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../trunk/configure --prefix=/home/dcb/gcc/results.267000.valgrind --disable-bootstrap --disable-multilib --disable-werror --enable-checking=valgrind --enable-languages=c,c++,fortran Thread model: posix gcc version 9.0.0 20181211 (experimental) (GCC) $