Fortran: add contiguous check for ptr assignment, fix non-contig check (PR97242)
authorTobias Burnus <tobias@codesourcery.com>
Wed, 30 Sep 2020 13:01:13 +0000 (15:01 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Wed, 30 Sep 2020 13:01:13 +0000 (15:01 +0200)
commit65167982efa4dbb96698d026e6d7e17acb513f0a
tree3d5bc9c39be8e950bd889436ee84d1148c0ae582
parent8b0a63e47cd83f4e8534d0d201739bdd10f321a2
Fortran: add contiguous check for ptr assignment, fix non-contig check (PR97242)

gcc/fortran/ChangeLog:

PR fortran/97242
* expr.c (gfc_is_not_contiguous): Fix check.
(gfc_check_pointer_assign): Use it.

gcc/testsuite/ChangeLog:

PR fortran/97242
* gfortran.dg/contiguous_11.f90: New test.
* gfortran.dg/contiguous_4.f90: Update.
* gfortran.dg/contiguous_7.f90: Update.
gcc/fortran/expr.c
gcc/testsuite/gfortran.dg/contiguous_11.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/contiguous_4.f90
gcc/testsuite/gfortran.dg/contiguous_7.f90