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

            Bug ID: 77873
           Summary: ICE in gfc_is_class_scalar_expr, at
                    fortran/class.c:380
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fort...@t-online.de
  Target Milestone: ---

For versions down to at least 4.8 :


$ cat z1.f90
program p
   type t
      real :: a
   end type
contains
   subroutine s(x)
      class(t) :: x[*]
      associate (z => x%a)
      end associate
   end
end


$ gfortran-7-20161002 -fcoarray=single -c z1.f90
z1.f90:8:0:

       associate (z => x%a)

internal compiler error: Segmentation fault
0xc29b8f crash_signal
        ../../gcc/toplev.c:337
0x66dc10 gfc_is_class_scalar_expr(gfc_expr*)
        ../../gcc/fortran/class.c:380
0x7a9b37 trans_associate_var
        ../../gcc/fortran/trans-stmt.c:1517
0x7a9b37 gfc_trans_block_construct(gfc_code*)
        ../../gcc/fortran/trans-stmt.c:1810
0x724167 trans_code
        ../../gcc/fortran/trans.c:1815
0x7538f8 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6257
0x753747 gfc_generate_contained_functions
        ../../gcc/fortran/trans-decl.c:5237
0x753747 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6186
0x6de270 translate_all_program_units
        ../../gcc/fortran/parse.c:5940
0x6de270 gfc_parse_file()
        ../../gcc/fortran/parse.c:6146
0x720e82 gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:198

Reply via email to