https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97054
H.J. Lu changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from H.J. Lu ---
Fixed for GCC 10.3 by
commit 6959f60cb276ad530917c2d039d9edc19fefa216
Author: Richard Sandiford
Date: Fri Sep 18 16:55:45 2020 +0100
ira: Fix elimination for global hard FPs [PR97054]
If the hard frame pointer is being used as a global register,
we should skip the usual handling for eliminations. As the
comment says, the register cannot in that case be eliminated
(or eliminated to) and is already marked live where appropriate.
Doing this removes the duplicate error for gcc.target/i386/pr82673.c.
The “cannot be used in 'asm' here” message is meant to be for asm
statements rather than register asms, and the function that the
error is reported against doesn't use asm.
gcc/
2020-09-18 Richard Sandiford
PR middle-end/97054
* ira.c (ira_setup_eliminable_regset): Skip the special elimination
handling of the hard frame pointer if the hard frame pointer is
fixed.
gcc/testsuite/
2020-09-18 H.J. Lu
Richard Sandiford
PR middle-end/97054
* g++.target/i386/pr97054.C: New test.
* gcc.target/i386/pr82673.c: Remove redundant extra message.
(cherry picked from commit 3c7c5f1d4a4b8328fb4c07483cdbfe4ea7762155)