[PATCH] Fix ICE in distribute_notes (PR bootstrap/51796)
Eric Botcazou
ebotcazou@adacore.com
Wed Jan 11 13:03:00 GMT 2012
> I'd find that very fragile. E.g. distribute_notes itself reverses the
> order of all notes, and for no REG_NOTES I think we rely on any ordering.
AFAIK distribute_notes is the only routine that redistributes the RTL notes for
a fixed insn, so I'm a little skeptical about the purported fragility here.
My point is that the complexity should be in fixup_args_size_notes instead of
distribute_notes. Tentative patch attached.
PR bootstrap/51796
* calls.c (emit_call_1): Make sure REG_NORETURN note comes first.
* combine.c (distribute_notes): If i3 is a noreturn call, allow
old_size to be equal to args_size if !ACCUMULATE_OUTGOING_ARGS.
* expr.c (fixup_args_size_notes): Put REG_ARGS_SIZE notes on
noreturn calls even when the delta is 0.
* rtlanal.c (find_and_remove_reg_note): New function.
* rtl.h (find_and_remove_reg_note): Declare it.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-diff
Size: 5483 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120111/9e78e3b1/attachment.bin>
More information about the Gcc-patches
mailing list