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

            Bug ID: 107577
           Summary: [13 Regression] ICE in find_array_spec, at
                    fortran/resolve.cc:5008
           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 20220717 and 20220724 :


$ cat z1.f90
program p
   implicit none
   associate (y => f(4))
      if (lbound (y, 1) /= 1) stop 1
      if (y(1) /= 1) stop 2
   end associate
end


$ gfortran-13-20221106 -c z1.f90
z1.f90:3:19:

    3 |    associate (y => f(4))
      |                   1
Error: Function 'f' at (1) has no IMPLICIT type
z1.f90:3:23:

    3 |    associate (y => f(4))
      |                       1
Error: Symbol 'y' at (1) has no IMPLICIT type
z1.f90:3:19:

    3 |    associate (y => f(4))
      |                   1
Error: Selector at (1) has no type

in gfc_format_decoder, at fortran/error.cc:1071
0x7fab72 gfc_format_decoder
        ../../gcc/fortran/error.cc:1071
0x1f8bff0 pp_format(pretty_printer*, text_info*)
        ../../gcc/pretty-print.cc:1475
0x1f6af10 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
        ../../gcc/diagnostic.cc:1548
0x7fabd9 gfc_report_diagnostic
        ../../gcc/fortran/error.cc:883
0x7fad68 gfc_error_opt
        ../../gcc/fortran/error.cc:1453
0x7fc5d0 gfc_error(char const*, ...)
        ../../gcc/fortran/error.cc:1482
0x880aba find_array_spec
        ../../gcc/fortran/resolve.cc:5008
0x880aba gfc_resolve_ref(gfc_expr*)
        ../../gcc/fortran/resolve.cc:5355
0x8708d7 resolve_variable
        ../../gcc/fortran/resolve.cc:5870
0x8708d7 gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.cc:7196
0x8747df gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.cc:2234
0x8747df resolve_actual_arglist
        ../../gcc/fortran/resolve.cc:2153
0x87048e resolve_function
        ../../gcc/fortran/resolve.cc:3292
0x87048e gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.cc:7194
0x8739c9 gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.cc:7161
0x8739c9 resolve_operator
        ../../gcc/fortran/resolve.cc:4093
0x86feff gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.cc:7187
0x877231 gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.cc:7161
0x877231 gfc_resolve_blocks(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.cc:10842
0x8775d8 gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.cc:11970

Reply via email to