This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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 78641 - [OOP] ICE on polymorphic allocatable function in array constructor


I just submitted the text below in the above referenced bug report.

Damian


gfortran 6.2.0 and 7.0.0 20161127 report an internal compiler error when an allocatable polymorphic function appears in an array constructor: 

$ cat alloc-func-in-array-const.f90 
implicit none
  type foo
  end type
  type(foo) :: bar(1)
  bar = [f()]
contains
  function f() result(foobar)
     class(foo), allocatable :: foobar
    allocate(foobar,source = foo())
  end function
end program

$ gfortran alloc-func-in-array-const.f90 
f951: internal compiler error: Segmentation fault: 11

f951: internal compiler error: Abort trap: 6
gfortran: internal compiler error: Abort trap: 6 (program f951)




________________________________
Damian Rouson, Ph.D., P.E.
President, Sourcery Institute
http://www.sourceryinstitute.org
+1-510-600-2992 (mobile)


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