[Bug fortran/46413] New: [OOP] ICE when printing a polymorphic type

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Nov 10 13:53:00 GMT 2010


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

           Summary: [OOP] ICE when printing a polymorphic type
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
                CC: janus@gcc.gnu.org


The following invalid program gives an ICE:
test.f90:7:0: internal compiler error: Bad IO basetype (7)


type t
  integer :: ii =5
end type t
class(t), allocatable :: x
allocate (t :: x)

print *,x  ! PRINT of polymorphic type.
end


ifort prints:
test.f90(7): error #8303: A list item shall not be polymorphic unless it is
processed by a user-defined derived-type input/output procedure.   [X]

"9.6.3 Data transfer input/output list"
"A list item shall not be polymorphic unless it is processed by a de
ned
input/output procedure (9.6.4.8)."



More information about the Gcc-bugs mailing list