https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101574
--- Comment #3 from rguenther at suse dot de <rguenther at suse dot de> --- On Thu, 22 Jul 2021, tschwinge at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101574 > > --- Comment #2 from Thomas Schwinge <tschwinge at gcc dot gnu.org> --- > Created attachment 51194 > --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51194&action=edit > Valgrind log > > For both the non-working (offloading-disabled) and working > (offloading-enabled) > builds I'm using the same flags: '--prefix= --enable-languages=all > --enable-werror --enable-checking=yes,extra,rtl', and 'CC=gcc-4.8 CXX=g++-4.8' > ("gcc-4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4"), and some '--with-[...]' for > host libraries. The offloading-enabled build additionally has > '--enable-offload-targets=[...] --with-cuda-driver[...]' (shouldn't be > relevant > here). > > The stage 2 command line for 'lra-lives.o' is identical for the working vs. > non-working builds. > > I can reliably reproduce the 'lra-lives.o' error by re-running 'make', and > also > by manually running the command inside 'build-gcc/gcc/'. > > Running the latter with '-wrapper valgrind' ("valgrind-3.10.1", sorry) added, > I > see a number of "Conditional jump or move depends on uninitialised value(s)", > "Use of uninitialised value of size [...]"! First one: > > Conditional jump or move depends on uninitialised value(s) > at 0x149106D: sparseset_bit_p(sparseset_def*, unsigned int) > (sparseset.h:146) > by 0x1491B1D: mark_pseudo_regno_live(int) (ira-lives.c:326) > by 0x1491DD2: mark_pseudo_reg_live(rtx_def*, unsigned int) > (ira-lives.c:410) > by 0x1491E7F: mark_ref_live(df_ref_d*) (ira-lives.c:424) > by 0x1495444: process_bb_node_lives(ira_loop_tree_node*) > (ira-lives.c:1434) > by 0x1464EA2: ira_traverse_loop_tree(bool, ira_loop_tree_node*, void > (*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*)) (ira-build.c:1801) > by 0x14962BC: ira_create_allocno_live_ranges() (ira-lives.c:1735) > by 0x1469B40: ira_build() (ira-build.c:3428) > by 0x145EEF5: ira(_IO_FILE*) (ira.c:5752) > by 0x145F984: (anonymous namespace)::pass_ira::execute(function*) > (ira.c:6075) > by 0x16166AB: execute_one_pass(opt_pass*) (passes.c:2567) > by 0x16169E1: execute_pass_list_1(opt_pass*) (passes.c:2656) > > See log file I'm attaching. You want to configure with --enable-valgrind-annotations (the sparseset one is a false positive)