http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56500
Bug #: 56500 Summary: [OOP] "IMPLICIT CLASS(...)" wrongly rejected Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: bur...@gcc.gnu.org CC: ja...@gcc.gnu.org Found at http://mailman.j3-fortran.org/pipermail/j3/2013-March/006167.html "IMPLICIT CLASS(...) (...)" does not properly work with gfortran. R560 implicit-stmt is IMPLICIT implicit-spec-list or IMPLICIT NONE R561 implicit-spec is declaration-type-spec ( letter-spec-list ) R403 declaration-type-spec is intrinsic-type-spec or TYPE ( intrinsic-type-spec ) or TYPE ( derived-type-spec ) or CLASS ( derived-type-spec ) or CLASS ( * ) Example by Reinhold Bader: module mod_upimp type :: foo integer :: i end type end module program upimp use mod_upimp implicit class(foo) (a-b) implicit class(*) (c) allocatable :: aaf, caf allocate(aaf, source=foo(2)) allocate(caf, source=foo(3)) select type (aaf) type is (foo) write(*,*) aaf end select select type (caf) type is (foo) write(*,*) caf end select end program