This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/53320] New: -fcheck=pointer should diagnose pointer-assignment of a noncontiguous tgt to a CONTIGUOUS ptr
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 11 May 2012 09:23:25 +0000
- Subject: [Bug fortran/53320] New: -fcheck=pointer should diagnose pointer-assignment of a noncontiguous tgt to a CONTIGUOUS ptr
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53320
Bug #: 53320
Summary: -fcheck=pointer should diagnose pointer-assignment of
a noncontiguous tgt to a CONTIGUOUS ptr
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: burnus@gcc.gnu.org
Depends on: 45424
Related to PR 49232 (compile-time check) and PR 45424 (is_contiguous intrinsic,
of interest is the trans-intrinsic.c part).
For:
integer, pointer, CONTIGUOUS :: ptr
ptr => target
-fcheck=pointer should check whether the RHS is contiguous.
The standard demands: "If the pointer object has the CONTIGUOUS attribute, the
pointer target shall be contiguous." (Cf. "7.2.2.3 Data pointer assignment" in
the Fortran 2008 standard.) But that's not a constraint and thus needs to be
checked at run time.