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

            Bug ID: 108501
           Summary: [13 Regression] ICE in get_expr_storage_size, at
                    fortran/interface.cc:2941
           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: ---

Started between 20221218 and 20230108 :


$ cat z1.f90
program p
   real, parameter :: n = 2
   real :: a(1,(n),2)
   call s(a(:,:,1))
end
subroutine s(x)
   real :: x(2)
end


$ gfortran-13-20230122 -c z1.f90
z1.f90:3:15:

    3 |    real :: a(1,(n),2)
      |               1
Error: Expression at (1) must be of INTEGER type, found REAL
z1.f90:3:21:

    3 |    real :: a(1,(n),2)
      |                     1
Error: The module or main program array 'a' at (1) must have constant shape
f951: internal compiler error: Segmentation fault
0xf8a79f crash_signal
        ../../gcc/toplev.cc:314
0x848fd9 get_expr_storage_size
        ../../gcc/fortran/interface.cc:2941
0x848fd9 gfc_compare_actual_formal(gfc_actual_arglist**, gfc_formal_arglist*,
int, int, bool, locus*)
        ../../gcc/fortran/interface.cc:3327
0x9b3136 check_externals_procedure
        ../../gcc/fortran/frontend-passes.cc:5742
0x9b7e29 gfc_code_walker(gfc_code**, int (*)(gfc_code**, int*, void*), int
(*)(gfc_expr**, int*, void*), void*)
        ../../gcc/fortran/frontend-passes.cc:5352
0x9b968b gfc_check_externals0
        ../../gcc/fortran/frontend-passes.cc:5861
0x9ba614 gfc_check_externals(gfc_namespace*)
        ../../gcc/fortran/frontend-passes.cc:5883
0x89f2c0 gfc_parse_file()
        ../../gcc/fortran/parse.cc:6942
0x8edd9f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.cc:229

Reply via email to