From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 591563858CDA; Fri, 1 Dec 2023 05:29:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 591563858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701408566; bh=j0jn800idIXw9NQH/VcAs2yabaOmeq13yY/AEarsmes=; h=From:To:Subject:Date:In-Reply-To:References:From; b=JF3OOCpVuSKs79v28a2+URbCqLtl0OVlIkXRwm2kjun7bWxrVyxydM/7b8ad1t+Sd Pryntrmu/ANgUUuk8TB+M4+0Q34gphNNPSdrpDk+Juemx8UItr+0vB48WUj+FmtvdZ 7tLdGINzyMbSp2qSW7UJJA+Br4zuV1zQP20B/RpQ= From: "mscfd at gmx dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/112764] Associating entity does not have target attribute if selector has pointer attribute in associate block Date: Fri, 01 Dec 2023 05:29:25 +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: 13.1.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: mscfd at gmx dot net X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: anlauf at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.3 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=3D112764 --- Comment #10 from martin --- Thanks for the speedy fix! I just thought about a variation, which should n= ow with the fix work as well (was not yet able to compile current dev branch, = so cannot check myself): program assoc_ptr_in implicit none integer, dimension(:,:), pointer :: x integer, pointer :: j allocate(x(1:100,1:2), source=3D123) associate(i1 =3D> x(:,1)) call sub(i1) end associate deallocate(x) contains subroutine sub(j) integer, dimension(:), pointer, intent(in) :: j print *,j(1) end subroutine sub end program assoc_ptr_in=