For compile-time checking that can simply use the the gfc_is_simply_contiguous check. For run time, it should use the flag in the descriptor (if existing) or some library check, cf. pack checks.
Because of the potential descriptor element, mark dependent on PR 36825. >From Fortran 2008: 13.7.86 IS_CONTIGUOUS (ARRAY) Description. Test contiguity of an array (5.3.7). Class. Inquiry function. Argument. ARRAY may be of any type. It shall be an array. If it is a pointer it shall be associated. Result Characteristics. Default logical scalar. Result Value. The result has the value true if ARRAY is contiguous, and false otherwise. Example. After the pointer assignment AP => TARGET (1:10:2), IS_CONTIGUOUS (AP) has the value false. -- Summary: F2008: Add is_contiguous intrinsic Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org BugsThisDependsOn: 36825 OtherBugsDependingO 39627 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45424