From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D28DC3858D3C; Wed, 29 Nov 2023 14:01:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D28DC3858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701266505; bh=qGYSKAFgTEk/n9L0dctQExaqJCW2ZBdD3I6URp5GZTE=; h=From:To:Subject:Date:From; b=qJmTQG1WZN4UiRqKRxi+EbBfZtNEeBbRkWxkZdyUuFJcUvOZOYAUh7iXL0kIahjzN hxvvKV29072HrJebXzI5SSg+7gF3bAm++gdIAlFVgWyN10iIMawsTFFbr8IHSlta7y olwmdjeqyVObOZGIT5mJ72ec80c0/qNknkUPGEZI= From: "mscfd at gmx dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/112764] New: Associating entity does not have target attribute if selector has pointer attribute in associate block Date: Wed, 29 Nov 2023 14:01:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mscfd at gmx dot net 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 Bug ID: 112764 Summary: Associating entity does not have target attribute if selector has pointer attribute in associate block Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: mscfd at gmx dot net Target Milestone: --- The selector has the pointer attribute but association is with an array section. The associating entity should have the target attribute even in th= is case, right? gfortran complains with "Pointer assignment target is neither TARGET nor POINTER", ifort and ifx accept it. Looks like a bug in gfortran,= or has i1 indeed no target attribute? program assoc_target implicit none integer, dimension(:,:), pointer :: x integer, pointer :: j allocate(x(1:100,1:2), source=3D0) associate(i1 =3D> x(:,1)) j =3D> i1(1) print *, j end associate deallocate(x) end program assoc_target=