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

            Bug ID: 77871
           Summary: ICE in gfc_get_caf_token_offset, at
                    fortran/trans-expr.c:1981
           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: ---

Affects versions 5, 6 and 7. No ICE with 4.9.0.


$ cat z1.f90
module m
   type t
      logical :: q = .true.
   end type
contains
   subroutine s(x, n)
      class(t) :: x[*]
      integer :: n
      print *, x[n]%q
   end
end


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

       print *, x[n]%q

internal compiler error: in gfc_get_caf_token_offset, at
fortran/trans-expr.c:1981
0x76523c gfc_get_caf_token_offset(gfc_se*, tree_node**, tree_node**,
tree_node*, tree_node*, gfc_expr*)
        ../../gcc/fortran/trans-expr.c:1979
0x77baed gfc_conv_intrinsic_caf_get
        ../../gcc/fortran/trans-intrinsic.c:1811
0x789dcb gfc_conv_intrinsic_function(gfc_se*, gfc_expr*)
        ../../gcc/fortran/trans-intrinsic.c:8665
0x762ca2 gfc_conv_expr(gfc_se*, gfc_expr*)
        ../../gcc/fortran/trans-expr.c:7696
0x76a2c8 gfc_conv_expr_reference(gfc_se*, gfc_expr*)
        ../../gcc/fortran/trans-expr.c:7831
0x790026 gfc_trans_transfer(gfc_code*)
        ../../gcc/fortran/trans-io.c:2464
0x724057 trans_code
        ../../gcc/fortran/trans.c:1918
0x78ce50 build_dt
        ../../gcc/fortran/trans-io.c:1962
0x724077 trans_code
        ../../gcc/fortran/trans.c:1890
0x7538f8 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6257
0x728a49 gfc_generate_module_code(gfc_namespace*)
        ../../gcc/fortran/trans.c:2088
0x6de19d translate_all_program_units
        ../../gcc/fortran/parse.c:5927
0x6de19d gfc_parse_file()
        ../../gcc/fortran/parse.c:6146
0x720e82 gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:198

Reply via email to