[Bug target/104910] [10/11/12 Regression] ICE: internal consistency failure (error: invalid rtl sharing found in the insn)

2022-03-16 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104910

--- Comment #2 from CVS Commits  ---
The master branch has been updated by Jakub Jelinek :

https://gcc.gnu.org/g:952155629ca1a4dfe7c7b26e53d118a9b853ed4a

commit r12-7666-g952155629ca1a4dfe7c7b26e53d118a9b853ed4a
Author: Jakub Jelinek 
Date:   Wed Mar 16 11:04:16 2022 +0100

aarch64: Fix up RTL sharing bug in aarch64_load_symref_appropriately
[PR104910]

We unshare all RTL created during expansion, but when
aarch64_load_symref_appropriately is called after expansion like in the
following testcases, we use imm in both HIGH and LO_SUM operands.
If imm is some RTL that shouldn't be shared like a non-sharable CONST,
we get at least with --enable-checking=rtl a checking ICE, otherwise might
just get silently wrong code.

The following patch fixes that by copying it if it can't be shared.

2022-03-16  Jakub Jelinek  

PR target/104910
* config/aarch64/aarch64.cc (aarch64_load_symref_appropriately):
Copy
imm rtx.

* gcc.dg/pr104910.c: New test.

[Bug target/104910] [10/11/12 Regression] ICE: internal consistency failure (error: invalid rtl sharing found in the insn)

2022-03-14 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104910

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |10.4

[Bug target/104910] [10/11/12 Regression] ICE: internal consistency failure (error: invalid rtl sharing found in the insn)

2022-03-14 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104910

Jakub Jelinek  changed:

   What|Removed |Added

   Last reconfirmed||2022-03-14
 Ever confirmed|0   |1
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org
 Status|UNCONFIRMED |ASSIGNED

--- Comment #1 from Jakub Jelinek  ---
Created attachment 52623
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52623=edit
gcc12-pr104910.patch

Untested fix.