Hi,

this patch fixes PR 61047, where rtx_addr_can_trap_p_1
incorrectly assumes, that all SP-relative offsets can be safely
read witout causing any traps. And therefore such references
are safe to be moved out of an if-block.

This patch tries to get safe lower and upper bounds where accesses
are always guaranteed to work.  The goal is not to penalize
reasonable written code:  When boot-strapping the whole GCC
only a few places were found, where this new check triggers.

Boot-strapped and regression-tested on x86_64-linux-gnu.
Additionally built a cross compiler for a stack-grows-upward-target 
(xstormy16-elf).

Ok for trunk?


Thanks
Bernd.
                                          

Attachment: changelog-pr60147.diff
Description: Binary data

Attachment: patch-pr61047.diff
Description: Binary data

Reply via email to