https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103504
Bug ID: 103504
Summary: ICE in get_sym_storage_size, at
fortran/interface.c:2800
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
Affects versions down to at least r5 :
$ cat z1.f90
subroutine s(x)
real :: x(abs(1.))
end
program p
real :: y(1)
call s(y)
end
$ cat z2.f90
program p
real :: y(1)
call s(y)
contains
subroutine s(x)
real :: x(abs(1.))
end
end
$ gfortran-12-20211128 -c z1.f90
z1.f90:2:13:
2 | real :: x(abs(1.))
| 1
Error: Expression at (1) must be of INTEGER type, found REAL
z1.f90:2:13:
2 | real :: x(abs(1.))
| 1
Error: Expression at (1) must be of INTEGER type, found REAL
f951: internal compiler error: Segmentation fault
0xf0942f crash_signal
../../gcc/toplev.c:322
0x7e94f9 get_sym_storage_size
../../gcc/fortran/interface.c:2800
0x7e94f9 gfc_compare_actual_formal(gfc_actual_arglist**, gfc_formal_arglist*,
int, int, bool, locus*)
../../gcc/fortran/interface.c:3292
0x94dff6 check_externals_procedure
../../gcc/fortran/frontend-passes.c:5725
0x952ce9 gfc_code_walker(gfc_code**, int (*)(gfc_code**, int*, void*), int
(*)(gfc_expr**, int*, void*), void*)
../../gcc/fortran/frontend-passes.c:5333
0x95454b gfc_check_externals0
../../gcc/fortran/frontend-passes.c:5844
0x9553d4 gfc_check_externals(gfc_namespace*)
../../gcc/fortran/frontend-passes.c:5866
0x83d3c2 gfc_parse_file()
../../gcc/fortran/parse.c:6856
0x88b37f gfc_be_parse_file
../../gcc/fortran/f95-lang.c:216