This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/78641] New: [OOP] ICE on polymorphic allocatable function in array constructor
- From: "damian at sourceryinstitute dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 02 Dec 2016 02:15:49 +0000
- Subject: [Bug fortran/78641] New: [OOP] ICE on polymorphic allocatable function in array constructor
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78641
Bug ID: 78641
Summary: [OOP] ICE on polymorphic allocatable function in array
constructor
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: damian at sourceryinstitute dot org
Target Milestone: ---
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)