Fortran: IS_CONTIGUOUS and pointers to non-contiguous targets [PR114023]
PR fortran/114023
gcc/fortran/ChangeLog:
* trans-expr.cc (gfc_trans_pointer_assignment): Always set dtype
when remapping a pointer. For unlimited polymorphic LHS use
elem_len from RHS.
* trans-intrinsic.cc (gfc_conv_is_contiguous_expr): Extend inline
generated code for IS_CONTIGUOUS for pointer arguments to detect
when span differs from the element size.
gcc/testsuite/ChangeLog:
* gfortran.dg/is_contiguous_5.f90: New test.
(cherry picked from commit
3f8b6373f48af0eabbc2efe04df8f6856add3111)