This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 035/236] Return types of unlink_insn_chain and duplicate_insn_chain


David Malcolm <dmalcolm@redhat.com> writes:

> @@ -4083,7 +4083,7 @@ cfg_layout_can_duplicate_bb_p (const_basic_block bb)
>    return true;
>  }
>  
> -rtx
> +rtx_insn *
>  duplicate_insn_chain (rtx from, rtx to)
>  {
>    rtx insn, next, copy;
> @@ -4169,7 +4169,7 @@ duplicate_insn_chain (rtx from, rtx to)
>      }
>    insn = NEXT_INSN (last);
>    delete_insn (last);
> -  return insn;
> +  return as_a <rtx_insn *> (insn);

This is wrong, insn may be NULL.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]