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]

[PATCH] Fix PR rtl-opt/38281 ICE in reg_referenced_p with combine


Hi,
  The problem here is that distribute_notes assumes that if the i2 is
not NULL, INSN_P is true but it could have been a deleted instruction
note which case we could get an ICE on PATTERN of it (or get a NULL
from it without RTL checking enabled).  This patch fixes the problem
by adding the check for INSN_P.

OK?  Bootstrapped and tested on i386-darwin8.11 with no regressions.

Thanks,
Andrew Pinski

ChangeLog:

* combine.c (distribute_notes): Check to see if i2 is an insn rtl.

testsuite/ChangeLog:
* gcc.c-torture/compile/pr38281.c: New test.

Attachment: fixpr38281.diff.txt
Description: Text document


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