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/42335] New: [OOP] ICE on CLASS IS (bad_identifier)


Hi,

the following (invalid) code gives an ICE:

module gfcbug95
  implicit none
  type, abstract :: vector_class
  end type vector_class

  type, extends(vector_class) :: trivial_vector_type
    real :: elements(100)
  end type trivial_vector_type
contains
  subroutine bar (this,v)
    class(trivial_vector_type), intent(inout) :: this
    class(vector_class),        intent(in)    :: v

    select type (v)
!   class is (trivial_vector_type) ! OK
    class is (bad_id)              ! ICE
       this%elements(:) = v%elements(:)
    end select
  end subroutine bar
end module gfcbug95

% gfc45 gfcbug95.f90
gfcbug95.f90:16.20:

    class is (bad_id)              ! ICE
                    1
Error: 'bad_id' at (1) is not an accessible derived type
f951: internal compiler error: Segmentation fault

Cheers,
-ha


-- 
           Summary: [OOP] ICE on CLASS IS (bad_identifier)
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: anlauf at gmx dot de


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


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