https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123949
Bug ID: 123949
Summary: [16 regression] ice in gfc_match_decl_type_spec, at
fortran/decl.cc:4782
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
For this Fortran 90 source code:
fujitsu $ more trunk/Fortran/0413/0413_0003.f90
module m1
integer(8),parameter::n=2147483648_8+100_8
type x8(k)
integer(8),kind::k
integer (8) :: a=k
end type
type (x8(n)) :: v1
type (x8(n)),allocatable :: v2
contains
subroutine s1
if (v1%a/=n) print *,101
allocate (x8(n):: v2)
if (v2%a/=n) print *,102
end subroutine
end
use m1
call s1
print *,'pass'
end
fujitsu $
from the Fujitsu compiler test suite at
https://github.com/fujitsu/compiler-test-suite
is ok with gfortran 15.2.0:
fujitsu $ ~/gcc/results.15.2.0/bin/gfortran -c -w
trunk/Fortran/0413/0413_0003.f90
fujitsu $
but goes wrong with recent gcc trunk:
fujitsu $ ~/gcc/results.20260131.ubsan/bin/gfortran -c -w
trunk/Fortran/0413/0413_0003.f90
f951: internal compiler error: in gfc_match_decl_type_spec, at
fortran/decl.cc:4782
0x1fc04b7 internal_error
/home/dcb42/gcc/working/gcc/../../trunk/gcc/diagnostic-global-context.cc:787
0x1fca70b fancy_abort
/home/dcb42/gcc/working/gcc/../../trunk/gcc/diagnostics/context.cc:1812
0x433709 gfc_match_decl_type_spec
/home/dcb42/gcc/working/gcc/../../trunk/gcc/fortran/decl.cc:4782
and a gfortran from early January 2026:
fujitsu $ ~/gcc/results.20260102.asan.ubsan/bin/gfortran -c -w
trunk/Fortran/0413/0413_0003.f90
f951: internal compiler error: in gfc_match_decl_type_spec, at
fortran/decl.cc:4781