public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/97269] [11 Regression] ICE in change_address_1, at emit-rtl.c:2275 since r11-3427-ge94797250b403d66cb3624a594e41faf0dd76617 Date: Tue, 05 Jan 2021 11:29:51 +0000 [thread overview] Message-ID: <bug-97269-4-sp4DrKgTYp@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-97269-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97269 --- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Sandiford <rsandifo@gcc.gnu.org>: https://gcc.gnu.org/g:e8beba1cfc761cc35762283b3b44a355ef05e25b commit r11-6461-ge8beba1cfc761cc35762283b3b44a355ef05e25b Author: Richard Sandiford <richard.sandiford@arm.com> Date: Tue Jan 5 11:29:10 2021 +0000 explow, aarch64: Fix force-Pmode-to-mem for ILP32 [PR97269] This patch fixes a mode/rtx mismatch for ILP32 targets in: mem = force_const_mem (ptr_mode, imm); where imm can be Pmode rather than ptr_mode. The patch uses convert_memory_address to convert the Pmode address to ptr_mode before the call. However, immediate addresses can in general contain unspecs, and convert_memory_address wasn't set up to handle those. The patch therefore adds some generic unspec handling to convert_memory_address_addr_space_1. As the comment says, we can add a target hook if this behaviour turns out to be wrong for some targets. But I think what the patch does is a strict improvement over the status quo: without it, we would try to force the unspec into a register, but nevertheless wrap the result in a (const ...). That in turn would be invalid rtl and seems bound to generate an ICE later. I tested the explow.c part using -fstack-protector with local hacks to force SYMBOL_FORCE_TO_MEM for UNSPEC_SALT_ADDR. Fixes c-c++-common/torture/pr57945.c and various other tests. gcc/ PR target/97269 * explow.c (convert_memory_address_addr_space_1): Handle UNSPECs nested in CONSTs. * config/aarch64/aarch64.c (aarch64_expand_mov_immediate): Use convert_memory_address to convert symbolic immediates to ptr_mode before forcing them to memory.
next prev parent reply other threads:[~2021-01-05 11:29 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-02 7:33 [Bug target/97269] New: " marxin at gcc dot gnu.org 2020-10-02 7:33 ` [Bug target/97269] " marxin at gcc dot gnu.org 2020-10-02 13:49 ` rguenth at gcc dot gnu.org 2020-10-12 11:46 ` rguenth at gcc dot gnu.org 2020-10-13 7:37 ` marxin at gcc dot gnu.org 2020-10-29 18:45 ` rsandifo at gcc dot gnu.org 2021-01-05 11:29 ` cvs-commit at gcc dot gnu.org [this message] 2021-01-05 11:31 ` rsandifo at gcc dot gnu.org 2021-03-29 11:47 ` rsandifo at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-97269-4-sp4DrKgTYp@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).