[patch,wip] warn on noncontiguous pointers
Cesar Philippidis
cesar@codesourcery.com
Wed Oct 3 21:16:00 GMT 2018
On 09/30/2018 11:12 AM, Thomas Koenig wrote:
> Am 28.09.18 um 07:12 schrieb Bader, Reinhold:
>> Â Looking at 5.3.8.1 (Fortran 2008 for the sake of this discussion),
>> we have that
>> an object that has the DIMENSION attribute is an array. array-spec
>> includes deferred-shape-spec-list,
>> so any object declared with deferred shape is an array.
>
> OK, I see, so this code is indeed legal. Thanks!
>
> @Cesar: The idea behind your patch is sound. I think this would
> fit into the "legal, but can sometimes bite you" category,
> so I think would be better with -Wextra (where we accept that
> there might be quite a few false positives).
>
> Could you adapt your patch accordingly and also add two test cases,
> one testing for the absence of the warning/error with normal
> options, and one for the warning with -Wextra?
How's this patch look? I bootstrapped and regression tested it for
x86_64 Linux with nvptx offloading (not that it exercised any offloading
functionality).
Is it OK for trunk?
Thanks,
Cesar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fortran-Disable-Assignment-to-contiguous-pointer-fro.patch
Type: text/x-patch
Size: 3253 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20181003/b0a6c282/attachment.bin>
More information about the Fortran
mailing list