https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108421

            Bug ID: 108421
           Summary: ICE in get_expr_storage_size, at
                    fortran/interface.cc:2862
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Affects versions down to at least r5 :
(follow-up of pr107707)


$ cat z1.f90
program p
   character(real(3)) :: c
   call s(c)
end
subroutine s(x)
   character(*) :: x
end


$ gfortran-13-20230115 -c z1.f90
z1.f90:2:13:

    2 |    character(real(3)) :: c
      |             1
Error: Expression at (1) must be of INTEGER type, found REAL
f951: internal compiler error: Segmentation fault
0xf8734f crash_signal
        ../../gcc/toplev.cc:314
0x848e0d get_expr_storage_size
        ../../gcc/fortran/interface.cc:2862
0x848e0d gfc_compare_actual_formal(gfc_actual_arglist**, gfc_formal_arglist*,
int, int, bool, locus*)
        ../../gcc/fortran/interface.cc:3326
0x9b2746 check_externals_procedure
        ../../gcc/fortran/frontend-passes.cc:5742
0x9b7439 gfc_code_walker(gfc_code**, int (*)(gfc_code**, int*, void*), int
(*)(gfc_expr**, int*, void*), void*)
        ../../gcc/fortran/frontend-passes.cc:5352
0x9b8c9b gfc_check_externals0
        ../../gcc/fortran/frontend-passes.cc:5861
0x9b9c24 gfc_check_externals(gfc_namespace*)
        ../../gcc/fortran/frontend-passes.cc:5883
0x89e900 gfc_parse_file()
        ../../gcc/fortran/parse.cc:6942
0x8ed3af gfc_be_parse_file
        ../../gcc/fortran/f95-lang.cc:229

Reply via email to