User account creation filtered due to spam.

Bug 53320 - -fcheck=pointer should diagnose pointer-assignment of a noncontiguous tgt to a CONTIGUOUS ptr
Summary: -fcheck=pointer should diagnose pointer-assignment of a noncontiguous tgt to ...
Status: WAITING
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic
Depends on: 45424
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-11 09:23 UTC by Tobias Burnus
Modified: 2015-11-05 09:55 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2015-11-05 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2012-05-11 09:23:25 UTC
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.
Comment 1 Dominique d'Humieres 2015-11-05 09:55:47 UTC
Duplicate or pr49232?