https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79345
--- Comment #14 from rguenther at suse dot de <rguenther at suse dot de> --- On Wed, 1 Mar 2017, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79345 > > --- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> --- > (In reply to Richard Biener from comment #9) > > actually the genemit fix doensn't fully work: > > > > /space/rguenther/src/svn/trunk/gcc/config/i386/i386.md: In function > > ‘rtx_def* gen_smulsi3_highpart(rtx, rtx, rtx)’: > > /space/rguenther/src/svn/trunk/gcc/config/i386/i386.md:7380:26: error: > > ‘operands[3]’ is used uninitialized in this function [-Werror=uninitialized] > > (any_extend:TI > > ~~~~~~ ^ > > /space/rguenther/src/svn/trunk/gcc/config/i386/i386.md: In function > > ‘rtx_def* gen_umulsi3_highpart(rtx, rtx, rtx)’: > > /space/rguenther/src/svn/trunk/gcc/config/i386/i386.md:7380:26: error: > > ‘operands[3]’ is used uninitialized in this function [-Werror=uninitialized] > > (any_extend:TI > > ~~~~~~ ^ > > ... > > > > bah. > > --- gcc/genemit.c.jj 2017-01-01 12:45:35.000000000 +0100 > +++ gcc/genemit.c 2017-03-01 10:51:27.474179940 +0100 > @@ -518,6 +518,9 @@ gen_expand (md_rtx_info *info) > { > for (i = 0; i < stats.num_operand_vars; i++) > { > + if (i > MAX (stats.max_opno, stats.max_dup_opno) > + && i <= stats.max_scratch_opno) > + continue; > printf (" operand%d = operands[%d];\n", i, i); > printf (" (void) operand%d;\n", i); > } > > should fix that. Even if some define_insn doesn't have any match_dups, it can > still have normal operands. Looks like we have patterns with dups after scratches: (define_expand "<s>mul<mode>3_highpart" [(parallel [(set (match_operand:SWI48 0 "register_operand") (truncate:SWI48 (lshiftrt:<DWI> (mult:<DWI> (any_extend:<DWI> (match_operand:SWI48 1 "nonimmediate_operand")) (any_extend:<DWI> (match_operand:SWI48 2 "register_operand"))) (match_dup 4)))) (clobber (match_scratch:SWI48 3)) (clobber (reg:CC FLAGS_REG))])] which then still warns: /space/rguenther/src/svn/trunk/gcc/config/i386/i386.md: In function ‘rtx_def* gen_umulsi3_highpart(rtx, rtx, rtx)’: /space/rguenther/src/svn/trunk/gcc/config/i386/i386.md:7380:14: warning: ‘operands[3]’ is used uninitialized in this function [-Wuninitialized] (any_extend:TI ~~~~~~^~~~~~~~ ...