https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124907
Bug ID: 124907
Summary: ICE in maybe_record_trace_start during dwarf2 on
AArch64 with -O3 -mtune=neoverse-n1
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: cmuellner at gcc dot gnu.org
Target Milestone: ---
On current master (257daea0bf0ff41 from Apr 16, 2026), I see a gfortran ICEs on
valid Fortran source during RTL pass 'dwarf2' in maybe_record_trace_start on
AArch64 with -O3 -mtune=neoverse-n1.
I've reduced the Fortran source with cvise to the following:
subroutine f (t, n)
real(8) :: a
real :: t(*)
j = n / 2 - 1
do k = 0, j
a = dble(k) * d
t(2 * k + 1) = cos(a)
t(2 * k + 2) = sin(a)
end do
do
if (i < 2) then
end if
end do
end
To reproduce, the following command can be used (both, -O3 and
-mtune=neoverse-n1, are required):
gfortran -c -O3 -mtune=neoverse-n1 t.f90
Flags combinations that reproduce are:
* -O3 -mtune=neoverse-n1
* -O3 -mtune=cortex-a57
* -O3 -mtune=cortex-a76
* -O3 -mcpu=neoverse-n1
The ICE looks like this:
Compiler output:
during RTL pass: dwarf2
temperton_gcc_test.f90:21:3:
21 | end
| ^
internal compiler error: in maybe_record_trace_start, at dwarf2cfi.cc:2591
0x24da6bf internal_error(char const*, ...)
0x76342b fancy_abort(char const*, int, char const*)
0xac6363 maybe_record_trace_start
0xac69ef scan_trace
0xac7383 create_cfi_notes
0xac7383 execute_dwarf2_frame
0xac7383 execute