https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99477
Bug ID: 99477 Summary: CONTIGUOUS assumed-shape dummy not working with associate construct Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: townsend at astro dot wisc.edu Target Milestone: --- Created attachment 50335 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50335&action=edit Example program I think I've stumbled on a bug with gfortran's handling of the CONTIGUOUS attribute in assumed-shape dummy arguments, when the actual argument is an array slice set up using an ASSOCIATE construct. The example program demonstrates the issue. When compiled with gfortran 10.2.0, I get the following output: 1 3 5 7 9 1 3 5 7 9 1 2 3 4 5 1 3 5 7 9 (note the third line, which has only stride 1). Whereas, I believe the output should be 1 3 5 7 9 1 3 5 7 9 1 3 5 7 9 1 3 5 7 9 The issue goes away if I remove the CONTIGUOUS attribute from the function argument. cheers, Rich