On Fri, Sep 02, 2016 at 02:21:07PM -0400, Eric Gallager wrote:
> ../../gcc/combine.c: In function ‘int combine_instructions(rtx_insn*,
> unsigned int)’:
> ../../gcc/combine.c:1310:8: warning: ‘prev’ may be used uninitialized
> in this function [-Wmaybe-uninitialized]
>         if ((next = try_combine (insn, prev, NULL, NULL,
>         ^~

That is:

          if (HAVE_cc0
              && JUMP_P (insn)
              && (prev = prev_nonnote_insn (insn)) != 0
              && NONJUMP_INSN_P (prev)
              && sets_cc0_p (PATTERN (prev)))
            {
              if ((next = try_combine (insn, prev, NULL, NULL,
                                       &new_direct_jump_p,
                                       last_combined_insn)) != 0)

so prev is always initialised here.  Could you try to find out why GCC
warns anyway?  Or open a PR?

HAVE_cc0 probably expands to 0 (I'm not sure what your target is), that
might have something to do with it.


Segher

Reply via email to