From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B7A3C385B835; Fri, 17 Apr 2020 14:16:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B7A3C385B835 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587132999; bh=obPj/KLpOdo/cCXApkwjpwunUXvHizaVNNV8yJuBrDA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DIUt8nUQaDdIlcZHe4EYN3T5FKIz7uBtFuzJgyk4fWLEJcWlSqsEkeigrAFD0cs1C LOQeORKnnBbeQK3bzGnn4G6T49u4NIRv8mfJbKkw0Z42ptT5T1/koX3Q9Em4mBUDRJ MJ+ceSAzfS12539bglvUoAY4xHJ56XNnbdD0yJVc= From: "tkoenig at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/94578] Incorrect assignment of RESHAPE() result to a Fortran pointer Date: Fri, 17 Apr 2020 14:16:39 +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: 8.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tkoenig 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: Fri, 17 Apr 2020 14:16:39 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94578 --- Comment #8 from Thomas Koenig --- The bug appears to affect intrinsics only, for example this program main implicit none type foo integer :: x, y end type foo integer, dimension(:), pointer :: bp type (foo), dimension(4), target :: b data b%x /1,2,3,4/ data b%y /-1,-2,-3,-4/ bp =3D> b%x bp =3D x() print *,bp contains function x() integer, dimension(4) :: x x =3D [11,12,13,14] end function x end program main works as expected (and creates an array temporary). Let's see what we can do here, if this should be solved on the library side or if we should just insert a temporary array here...=