From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6C26C3858D39; Fri, 2 Dec 2022 21:26:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C26C3858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1670016367; bh=COjs3rL+3i76xvnqRwubvG2wj+Crt3CfogGr3ggQXIs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=w8hxjHL7PU5eU2BnSET1IhLlwtA/LUz+NF4TsUA20oAvsuwomHUssF110nXrVD04p oquvQIXIKVGN13yNJ99X1F/Wh1vv1ujaMjXf781EhZ3Vxj/gFBjsEJ9pa/u4ymHLPi MrZed2Euw9V1cunhs0pUk2BqkyaBs1cpi9BhPo9s= From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/107874] merge not using all its arguments Date: Fri, 02 Dec 2022 21:26:07 +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: unknown X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf at gcc dot gnu.org X-Bugzilla-Status: REOPENED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: anlauf at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107874 --- Comment #20 from anlauf at gcc dot gnu.org --- (In reply to anlauf from comment #19) > I don't recall having seen a mentioning in the standard of the order of > evaluation of different function (or subroutine) arguments. Do you? The closest I can find is the following in F2018: C.5.1 Evaluation of function references (10.1.7) (1) If more than one function reference appears in a statement, they can be executed in any order (subject to a function result being evaluated after t= he evaluation of its arguments) and their values cannot depend on the order of execution. This lack of dependence on order of evaluation enables parallel execution of the function references. And: A.2 Processor dependencies According to this document, the following are processor dependent: ... =E2=80=A2 the order of finalization of components of objects of derived typ= e (7.5.6.2) =E2=80=A2 the order of finalization when several objects are finalized as t= he consequence of a single event (7.5.6.2);=