[Bug fortran/84008] New: [PDT] ICE accessing kind and len parameters

kargl at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 23 20:26:00 GMT 2018


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

            Bug ID: 84008
           Summary: [PDT] ICE accessing kind and len parameters
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kargl at gcc dot gnu.org
  Target Milestone: ---

module mod

   type :: objects(k1,l1)
      integer, kind :: k1 = selected_int_kind(4)
      integer, len :: l1 
      integer(k1) :: p(l1+1)
   end type

   contains
      subroutine foo(n)
         integer n
         type(objects(l1=n)) :: x
         ! Any of these lines causes an ICE
         print *, x%k1 .eq. selected_int_kind(4) 
         print *, x%l1 .eq. n 
         print *, size(x%p) .eq. x%l1+1
      end subroutine

end module

program p
   use mod
   type(objects(1,30)) :: x
   call foo(3)
end program p

internal compiler error: in gfc_conv_expr_op, at fortran/trans-expr.c:3371
0x5aa423 gfc_conv_expr_op
        ../../gcc/gcc/fortran/trans-expr.c:3371
0x5aa423 gfc_conv_expr(gfc_se*, gfc_expr*)
        ../../gcc/gcc/fortran/trans-expr.c:7859
0x8520b7 gfc_conv_expr_val(gfc_se*, gfc_expr*)
        ../../gcc/gcc/fortran/trans-expr.c:7916
0x8521e0 gfc_conv_expr_type(gfc_se*, gfc_expr*, tree_node*)
        ../../gcc/gcc/fortran/trans-expr.c:7930
0x82bd56 structure_alloc_comps
        ../../gcc/gcc/fortran/trans-array.c:9082
0x82e9f0 gfc_allocate_pdt_comp(gfc_symbol*, tree_node*, int,
gfc_actual_arglist*)
        ../../gcc/gcc/fortran/trans-array.c:9358
0x83e2a0 gfc_trans_deferred_vars(gfc_symbol*, gfc_wrapped_block*)
        ../../gcc/gcc/fortran/trans-decl.c:4350
0x841381 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/gcc/fortran/trans-decl.c:6563
0x819671 gfc_generate_module_code(gfc_namespace*)
        ../../gcc/gcc/fortran/trans.c:2206
0x7cba6b translate_all_program_units
        ../../gcc/gcc/fortran/parse.c:6090
0x7cba6b gfc_parse_file()
        ../../gcc/gcc/fortran/parse.c:6306
0x811abf gfc_be_parse_file


More information about the Gcc-bugs mailing list