public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/99725] New: arm: ICE in dwarf2out_frame_debug_adjust_cfa with -mcmse
@ 2021-03-23 10:45 acoplan at gcc dot gnu.org
2021-04-30 9:29 ` [Bug target/99725] " acoplan at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-03-23 10:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99725
Bug ID: 99725
Summary: arm: ICE in dwarf2out_frame_debug_adjust_cfa with
-mcmse
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: acoplan at gcc dot gnu.org
Target Milestone: ---
The following fails:
$ cat test.c
typedef int __attribute__((cmse_nonsecure_call)) (*t)();
t f;
void g() { f(); }
$ arm-eabi-gcc -c test.c -march=armv8.1-m.main -mcmse -g
during RTL pass: dwarf2
test.c: In function 'g':
test.c:3:17: internal compiler error: in dwarf2out_frame_debug_adjust_cfa, at
dwarf2cfi.c:1189
3 | void g() { f(); }
| ^
0x8a9ebe dwarf2out_frame_debug_adjust_cfa
/home/alecop01/toolchain/src/gcc/gcc/dwarf2cfi.c:1189
0x8a9ebe dwarf2out_frame_debug
/home/alecop01/toolchain/src/gcc/gcc/dwarf2cfi.c:2098
0x8a9ebe scan_insn_after
/home/alecop01/toolchain/src/gcc/gcc/dwarf2cfi.c:2547
0x8ab702 scan_trace
/home/alecop01/toolchain/src/gcc/gcc/dwarf2cfi.c:2714
0x8ac12c create_cfi_notes
/home/alecop01/toolchain/src/gcc/gcc/dwarf2cfi.c:2758
0x8ac12c execute_dwarf2_frame
/home/alecop01/toolchain/src/gcc/gcc/dwarf2cfi.c:3128
0x8ac12c execute
/home/alecop01/toolchain/src/gcc/gcc/dwarf2cfi.c:3616
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
^ 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 ` 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
end of thread, other threads:[~2021-09-17 6:43 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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
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).