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

            Bug ID: 99326
           Summary: [9/10/11 Regression] ICE in
                    gfc_build_dummy_array_decl, at
                    fortran/trans-decl.c:1299
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Started with r9, changed between 20181014 and 20181021 :


$ cat z1.f90
program p
   type t0
   end type
   type t
      class(t0), allocatable :: a(:)
   end type
contains
   subroutine s(x)
      class(t0) :: x(:)
      type(t) :: z
      associate (y => x)
         z%a = y
      end associate
   end
end


$ gfortran-9-20181014 -c z1.f90
z1.f90:11:23:

11 |       associate (y => x)
   |                       1
Error: Assumed shape array at (1) must be a dummy argument


$ gfortran-11-20210228 -c z1.f90
z1.f90:1:9:

    1 | program p
      |         1
internal compiler error: in gfc_build_dummy_array_decl, at
fortran/trans-decl.c:1299
0x754a97 gfc_build_dummy_array_decl
        ../../gcc/fortran/trans-decl.c:1299
0x759043 gfc_get_symbol_decl(gfc_symbol*)
        ../../gcc/fortran/trans-decl.c:1697
0x75c05f generate_local_decl
        ../../gcc/fortran/trans-decl.c:5950
0x71af42 do_traverse_symtree
        ../../gcc/fortran/symbol.c:4170
0x75d004 generate_local_vars
        ../../gcc/fortran/trans-decl.c:6156
0x75d004 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6815
0x75cfe4 gfc_generate_contained_functions
        ../../gcc/fortran/trans-decl.c:5874
0x75cfe4 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6812
0x6e3a46 translate_all_program_units
        ../../gcc/fortran/parse.c:6351
0x6e3a46 gfc_parse_file()
        ../../gcc/fortran/parse.c:6620
0x72fd7f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:212

Reply via email to