* [Bug target/99725] arm: ICE in dwarf2out_frame_debug_adjust_cfa with -mcmse
2021-03-23 10:45 [Bug target/99725] New: arm: ICE in dwarf2out_frame_debug_adjust_cfa with -mcmse acoplan at gcc dot gnu.org
@ 2021-04-30 9:29 ` acoplan at gcc dot gnu.org
2021-05-11 12:12 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-04-30 9:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99725
Alex Coplan <acoplan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |acoplan at gcc dot gnu.org
Last reconfirmed| |2021-04-30
Ever confirmed|0 |1
--- Comment #1 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Taking a look at this.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/99725] arm: ICE in dwarf2out_frame_debug_adjust_cfa with -mcmse
2021-03-23 10:45 [Bug target/99725] New: arm: ICE in dwarf2out_frame_debug_adjust_cfa with -mcmse acoplan at gcc dot gnu.org
2021-04-30 9:29 ` [Bug target/99725] " acoplan at gcc dot gnu.org
@ 2021-05-11 12:12 ` cvs-commit at gcc dot gnu.org
2021-05-11 12:13 ` acoplan at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-11 12:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99725
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alex Coplan <acoplan@gcc.gnu.org>:
https://gcc.gnu.org/g:2ac1f0eb3887335b7a7e845812956fa436e72a91
commit r12-715-g2ac1f0eb3887335b7a7e845812956fa436e72a91
Author: Alex Coplan <alex.coplan@arm.com>
Date: Tue May 11 13:11:09 2021 +0100
arm: Avoid emitting bogus CFA adjusts for CMSE nonsecure calls [PR99725]
The PR shows us attaching REG_CFA_ADJUST_CFA notes to stack pointer
adjustments emitted in cmse_nonsecure_call_inline_register_clear (when
-march=armv8.1-m.main). However, the stack pointer is not guaranteed to
be the CFA reg. If we're at -O0 or we have -fno-omit-frame-pointer, then
the frame pointer will be used as the CFA reg, and these notes on the sp
adjustments will lead to ICEs in dwarf2out_frame_debug_adjust_cfa.
This patch avoids emitting these notes if the current function has a
frame pointer.
gcc/ChangeLog:
PR target/99725
* config/arm/arm.c (cmse_nonsecure_call_inline_register_clear):
Avoid emitting CFA adjusts on the sp if we have the fp.
gcc/testsuite/ChangeLog:
PR target/99725
* gcc.target/arm/cmse/pr99725.c: New test.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/99725] arm: ICE in dwarf2out_frame_debug_adjust_cfa with -mcmse
2021-03-23 10:45 [Bug target/99725] New: arm: ICE in dwarf2out_frame_debug_adjust_cfa with -mcmse acoplan at gcc dot gnu.org
2021-04-30 9:29 ` [Bug target/99725] " acoplan at gcc dot gnu.org
2021-05-11 12:12 ` cvs-commit at gcc dot gnu.org
@ 2021-05-11 12:13 ` acoplan at gcc dot gnu.org
2021-05-27 9:42 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-05-11 12:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99725
--- Comment #3 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Fixed on trunk, keeping open for backports.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/99725] arm: ICE in dwarf2out_frame_debug_adjust_cfa with -mcmse
2021-03-23 10:45 [Bug target/99725] New: arm: ICE in dwarf2out_frame_debug_adjust_cfa with -mcmse acoplan at gcc dot gnu.org
` (2 preceding siblings ...)
2021-05-11 12:13 ` acoplan at gcc dot gnu.org
@ 2021-05-27 9:42 ` cvs-commit at gcc dot gnu.org
2021-06-01 16:22 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-27 9:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99725
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Alex Coplan
<acoplan@gcc.gnu.org>:
https://gcc.gnu.org/g:4290ac957ce13ab6097acda4b23cfd6ecf60b782
commit r11-8472-g4290ac957ce13ab6097acda4b23cfd6ecf60b782
Author: Alex Coplan <alex.coplan@arm.com>
Date: Tue May 11 13:11:09 2021 +0100
arm: Avoid emitting bogus CFA adjusts for CMSE nonsecure calls [PR99725]
The PR shows us attaching REG_CFA_ADJUST_CFA notes to stack pointer
adjustments emitted in cmse_nonsecure_call_inline_register_clear (when
-march=armv8.1-m.main). However, the stack pointer is not guaranteed to
be the CFA reg. If we're at -O0 or we have -fno-omit-frame-pointer, then
the frame pointer will be used as the CFA reg, and these notes on the sp
adjustments will lead to ICEs in dwarf2out_frame_debug_adjust_cfa.
This patch avoids emitting these notes if the current function has a
frame pointer.
gcc/ChangeLog:
PR target/99725
* config/arm/arm.c (cmse_nonsecure_call_inline_register_clear):
Avoid emitting CFA adjusts on the sp if we have the fp.
gcc/testsuite/ChangeLog:
PR target/99725
* gcc.target/arm/cmse/pr99725.c: New test.
(cherry picked from commit 2ac1f0eb3887335b7a7e845812956fa436e72a91)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/99725] arm: ICE in dwarf2out_frame_debug_adjust_cfa with -mcmse
2021-03-23 10:45 [Bug target/99725] New: arm: ICE in dwarf2out_frame_debug_adjust_cfa with -mcmse acoplan at gcc dot gnu.org
` (3 preceding siblings ...)
2021-05-27 9:42 ` cvs-commit at gcc dot gnu.org
@ 2021-06-01 16:22 ` cvs-commit at gcc dot gnu.org
2021-06-01 16:29 ` acoplan at gcc dot gnu.org
2021-09-17 6:43 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-01 16:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99725
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Alex Coplan
<acoplan@gcc.gnu.org>:
https://gcc.gnu.org/g:1cbde1725cac9ae53b892449c847f28f977f3a9b
commit r10-9877-g1cbde1725cac9ae53b892449c847f28f977f3a9b
Author: Alex Coplan <alex.coplan@arm.com>
Date: Tue May 11 13:11:09 2021 +0100
arm: Avoid emitting bogus CFA adjusts for CMSE nonsecure calls [PR99725]
The PR shows us attaching REG_CFA_ADJUST_CFA notes to stack pointer
adjustments emitted in cmse_nonsecure_call_inline_register_clear (when
-march=armv8.1-m.main). However, the stack pointer is not guaranteed to
be the CFA reg. If we're at -O0 or we have -fno-omit-frame-pointer, then
the frame pointer will be used as the CFA reg, and these notes on the sp
adjustments will lead to ICEs in dwarf2out_frame_debug_adjust_cfa.
This patch avoids emitting these notes if the current function has a
frame pointer.
gcc/ChangeLog:
PR target/99725
* config/arm/arm.c (cmse_nonsecure_call_inline_register_clear):
Avoid emitting CFA adjusts on the sp if we have the fp.
gcc/testsuite/ChangeLog:
PR target/99725
* gcc.target/arm/cmse/pr99725.c: New test.
(cherry picked from commit 2ac1f0eb3887335b7a7e845812956fa436e72a91)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/99725] arm: ICE in dwarf2out_frame_debug_adjust_cfa with -mcmse
2021-03-23 10:45 [Bug target/99725] New: arm: ICE in dwarf2out_frame_debug_adjust_cfa with -mcmse acoplan at gcc dot gnu.org
` (4 preceding siblings ...)
2021-06-01 16:22 ` cvs-commit at gcc dot gnu.org
@ 2021-06-01 16:29 ` acoplan at gcc dot gnu.org
2021-09-17 6:43 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-06-01 16:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99725
Alex Coplan <acoplan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Alex Coplan <acoplan at gcc dot gnu.org> ---
GCC 9 lacks armv8.1-m.main support (which the bug requires), so this is fixed
everywhere.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/99725] arm: ICE in dwarf2out_frame_debug_adjust_cfa with -mcmse
2021-03-23 10:45 [Bug target/99725] New: arm: ICE in dwarf2out_frame_debug_adjust_cfa with -mcmse acoplan at gcc dot gnu.org
` (5 preceding siblings ...)
2021-06-01 16:29 ` acoplan at gcc dot gnu.org
@ 2021-09-17 6:43 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-17 6:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99725
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |10.4
^ permalink raw reply [flat|nested] 8+ messages in thread