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/58586] New: ICE with derived type with a polymorphic allocatable component passed by value


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58586

            Bug ID: 58586
           Summary: ICE with derived type with a polymorphic allocatable
                    component passed by value
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vladimir.fuka at gmail dot com

> gfortran -c ice3.f90
ice3.f90: In function âsubâ:
ice3.f90:29:0: internal compiler error: Segmentation fault
    call add(b())
 ^
0x87dfdf crash_signal
        ../../gcc-4.8-20130425/gcc/toplev.c:332
0x5b19b0 structure_alloc_comps
        ../../gcc-4.8-20130425/gcc/fortran/trans-array.c:7440
0x5c97ca gfc_conv_procedure_call(gfc_se*, gfc_symbol*, gfc_actual_arglist*,
gfc_expr*, vec<tree_node*, va_gc, vl_embed>*)
        ../../gcc-4.8-20130425/gcc/fortran/trans-expr.c:4621
0x5ede84 gfc_trans_call(gfc_code*, bool, tree_node*, tree_node*, bool)
        ../../gcc-4.8-20130425/gcc/fortran/trans-stmt.c:406
0x5a7761 trans_code
        ../../gcc-4.8-20130425/gcc/fortran/trans.c:1500
0x5c4a02 gfc_generate_function_code(gfc_namespace*)
        ../../gcc-4.8-20130425/gcc/fortran/trans-decl.c:5397
0x568770 translate_all_program_units
        ../../gcc-4.8-20130425/gcc/fortran/parse.c:4474
0x568770 gfc_parse_file()
        ../../gcc-4.8-20130425/gcc/fortran/parse.c:4688
0x5a3a85 gfc_be_parse_file
        ../../gcc-4.8-20130425/gcc/fortran/f95-lang.c:189
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

module mod

  type,abstract :: a
  end type

  type :: b
     class(a),allocatable :: a
  end type

  interface b
    module procedure b_init
  end interface

contains

  subroutine add(c)
    type(b),value :: c
  end subroutine

  function b_init() result(res)
    type(b) :: res
  end function

end module mod

subroutine  sub
   use mod

   call add(b())

end subroutine  sub

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