[Bug target/85173] ICE in in extract_insn, at recog.c:2304 for -fstack-clash-protection on ARM
ktkachov at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 10 09:59:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85173
--- Comment #9 from ktkachov at gcc dot gnu.org ---
Author: ktkachov
Date: Tue Apr 10 09:58:57 2018
New Revision: 259266
URL: https://gcc.gnu.org/viewcvs?rev=259266&root=gcc&view=rev
Log:
[explow] PR target/85173: validize memory before passing it on to target
probe_stack
In this PR the expansion code emits an invalid memory address for the stack
probe, which the backend fails to recognise.
The address is created explicitly in anti_adjust_stack_and_probe_stack_clash in
explow.c and passed down to gen_probe_stack
without any validation in emit_stack_probe.
This patch fixes the ICE by calling validize_mem on the memory location before
passing it down to the target.
Jakub pointed out that we also want to create valid addresses for the
probe_stack_address case, so this patch
creates an expand operand and legitimizes it before passing it down to the
probe_stack_address expander.
This patch passes bootstrap and testing on arm-none-linux-gnueabihf and
aarch64-none-linux-gnu
and ppc64le-redhat-linux on gcc112 in the compile farm.
PR target/85173
* explow.c (emit_stack_probe): Call validize_mem on memory location
before passing it to gen_probe_stack. Create address operand and
legitimize it for the probe_stack_address case.
* gcc.target/arm/pr85173.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/arm/pr85173.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/explow.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list