[Bug fortran/104619] New: ICE on list comprehension with default derived type constructor

gronki at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Feb 21 19:29:54 GMT 2022


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

            Bug ID: 104619
           Summary: ICE on list comprehension with default derived type
                    constructor
           Product: gcc
           Version: 11.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gronki at gmail dot com
  Target Milestone: ---

This very short program produces an ICE with gfortran 11.2.1:

module m

    type :: item
        real :: x
    end type

    type :: container
        type(item) :: items(3)
    end type

end module

program p

    use m

    type(item), allocatable :: items(:)
    type(container) :: c

    items = [item(3.0), item(4.0), item(5.0)]
    ! ICE in the line below
    c = container(items=[(items(i), i = 1, size(items))])
    print *, c

end program


More information about the Gcc-bugs mailing list