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

            Bug ID: 92996
           Summary: ICE in gfc_conv_array_constructor_expr, at
                    fortran/trans-expr.c:7590
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Parameter attribute prevents a check down to at least gcc-5 :


$ cat z0.f90
program p
   integer :: a(2) = [1, 2]
   stop a
end

$ gfortran-10-20191215 -c z0.f90
z0.f90:3:7:

    3 |    stop a
      |       1
Error: STOP code at (1) must be scalar



$ cat z1.f90
program p
   integer, parameter :: a(2) = [1, 2]
   stop a
end


$ gfortran-10-20191215 -c z1.f90
z1.f90:3:0:

    3 |    stop a
      |
internal compiler error: in gfc_conv_array_constructor_expr, at
fortran/trans-expr.c:7590
0x75310d gfc_conv_array_constructor_expr
        ../../gcc/fortran/trans-expr.c:7590
0x75310d gfc_conv_expr(gfc_se*, gfc_expr*)
        ../../gcc/fortran/trans-expr.c:8681
0x7a4c37 gfc_trans_stop(gfc_code*, bool)
        ../../gcc/fortran/trans-stmt.c:650
0x70b302 trans_code
        ../../gcc/fortran/trans.c:1912
0x7424cd gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6801
0x6bc426 translate_all_program_units
        ../../gcc/fortran/parse.c:6302
0x6bc426 gfc_parse_file()
        ../../gcc/fortran/parse.c:6541
0x70742f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:210

Reply via email to