From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6DF923858CDA; Fri, 3 Nov 2023 15:28:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6DF923858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699025293; bh=e1g5sAUnDsZBVRkCL632RL4Iii7Q5yJVcXDYCsbYRaQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Y4RURpkgvyDoZnrXlxsCDm7x4NGPaY/iLuuijTtDCAqjMMW6zhE1dG/q5gg3N2pow 7sXoE6oa2nJZqYA7FPv+OwiLSsaHGQjh6/SZsfKyMRvePlYfcktSMGWgibfokM/egR UK39tVFyoqcLZOKFWyeX0lvpKnrURzzldHnZRCSc= From: "mikael at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/112371] Wrong upper bound for the result of reduction intrinsics if the array is empty Date: Fri, 03 Nov 2023 15:28:13 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mikael at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112371 --- Comment #1 from Mikael Morin --- (In reply to Mikael Morin from comment #0) > i =3D 1 > (...) > r =3D sum(a, dim=3Di) If i is inlined, that is r =3D sum(a, dim=3D1) the shape and ubound are (/ 3, 0, 7 /) as expected. The difference is probably caused by inline vs library implementation.=