Test case. The comments show what NAG f95 -C=all prints at run time. program ptr implicit none character(len=10), target :: s1 character(len=5), pointer :: p1 integer, volatile :: i i = 8 ! Unequal character lengths (5 and 8) in pointer assignment p1 => s1(1:i) call bar(s1) contains subroutine bar(s) character(len=*),target :: s character(len=17),pointer :: p ! Unequal character lengths (17 and 10) in pointer assignment p => s end subroutine bar end program ptr
-- Summary: Missing run-time bound checks for character pointer => target Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: diagnostic Severity: enhancement Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org OtherBugsDependingO 27766 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31822