From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AAC903858CD1; Fri, 3 Nov 2023 15:31:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AAC903858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699025479; bh=wiOtfCFQLDy/VvjXiPUSeBVqXwxLrRavs/30KLdzbwE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fJLZAGkQk4Q8m4HYO0kOsXKPmJmKK+MAEIsQOs8tViTjkKI3fKBzkrGU4nrYqxdvA dJOV8jn9zYT5L8m/DExGO4djXX5dtLi7f8YB8Dhr6nHxnnq3EdHQiOjHHrgxsLngrH 8lZ7PzkOtDi5ttFqlHxSXFedod6OxMjVJVN9r43s= 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:31:19 +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 #2 from Mikael Morin --- If dim =3D=3D 3, the ubound and shape are (/ 9, 3, 7 /) as expected. That is, the problem only arises if the resulting array is empty.=