From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0F5A63858D28; Mon, 4 Oct 2021 20:10:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0F5A63858D28 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBmb3J0cmFuLzkzMTQ4XSBQb2ludGVyLWZ1bmN0aW9uLXJl?= =?UTF-8?B?c3VsdCBhcyBMVkFMVUUgdmFyaWFibGUg4oCTIGZ1bmN0aW9uIGNhbGxlZCBt?= =?UTF-8?B?dWx0aXBsZSB0aW1lcyB3aXRoIGNvcHktaW4vb3V0?= Date: Mon, 04 Oct 2021 20:10:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2021 20:10:45 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D93148 --- Comment #3 from Tobias Burnus --- Additionally, it seems as if the contiguous check used for gfortran.dg/contiguous_10.f90 currently unconditionally copies in the data = =E2=80=93 which causes a problem when the pointer address escapes. (Okay, whether that works is implementation defined per F2018:15.5.2.4 paragraph 9, but it is still a missed optimizion.) =E2=80=93 Lightly relat= ed to the issue above as the issue shows up with copy-in/copy-out. Possible fix - whi= ch causes a multi-call issue for gfortran.dg/contiguous_10.f90, see previous comment: --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -6528,5 +6528,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sy= m, gfc_conv_subref_array_arg (&parmse, e, nodesc_arg, fsym->attr.intent, - fsym->attr.pointer); + fsym->attr.pointer, fsym, + sym->name, NULL, + /* check_contiguous=3D */ true= ); } else=