This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/85895] New: [6/7/8/9 Regression] ICE in gfc_conv_array_ref, at fortran/trans-array.c:3518


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

            Bug ID: 85895
           Summary: [6/7/8/9 Regression] ICE in gfc_conv_array_ref, at
                    fortran/trans-array.c:3518
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Down to version 5, gfortran-4.8/4.9 compiles this :

$ cat z1.f90
program p
   character(80) :: c(2)
   sync memory (errmsg=c)
end


$ gfortran-4.9 -c z1.f90 -fcoarray=lib
$
$ gfortran-9-20180520 -c z1.f90 -fcoarray=lib
z1.f90:3:0:

    sync memory (errmsg=c)

internal compiler error: in gfc_conv_array_ref, at fortran/trans-array.c:3518
0x7544d1 gfc_conv_array_ref(gfc_se*, gfc_array_ref*, gfc_expr*, locus*)
        ../../gcc/fortran/trans-array.c:3518
0x781bbd gfc_conv_variable
        ../../gcc/fortran/trans-expr.c:2737
0x77e8e2 gfc_conv_expr(gfc_se*, gfc_expr*)
        ../../gcc/fortran/trans-expr.c:7930
0x7b7bd0 gfc_trans_sync(gfc_code*, gfc_exec_op)
        ../../gcc/fortran/trans-stmt.c:1200
0x74ac77 trans_code
        ../../gcc/fortran/trans.c:1954
0x772219 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6507
0x7012a0 translate_all_program_units
        ../../gcc/fortran/parse.c:6121
0x7012a0 gfc_parse_file()
        ../../gcc/fortran/parse.c:6324
0x74809f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:204


While this variant compiles for all tested versions :

$ cat z3.f90
program p
   character(80) :: c
   sync memory (errmsg=c)
end

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]