The following invalid program is currently accepted: type t1 integer :: comp class(t1),pointer :: cc end type
class(t1) :: x ! invalid: must be dummy, allocatable or pointer x%comp = 3 print *,x%comp end Removing the line which defines the class pointer component 'cc' causes the program to be correctly rejected. -- Summary: [OOP] accepts-invalid with CLASS pointer component Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: janus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41618