https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104819
--- Comment #6 from anlauf at gcc dot gnu.org --- (In reply to anlauf from comment #5) > We need to detect and diagnose violations of the above. Example: program main implicit none type t integer :: i end type t type(t), allocatable, target :: xa type(t), pointer :: xp class(t), allocatable, target :: ya class(t), pointer :: yp call foo_p (xp) ! Invalid call foo_p (xa) ! Invalid in F2008, valid in F2018 call foo_p (yp) ! Valid, OK call foo_p (ya) ! Valid, OK contains subroutine foo_p (x) class(t), pointer, intent(in) :: x end subroutine end The lines marked invalid are detected for -std=f2003, but not for >= f2008.