public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/112764] New: Associating entity does not have target attribute if selector has pointer attribute in associate block
@ 2023-11-29 14:01 mscfd at gmx dot net
  2023-11-29 18:02 ` [Bug fortran/112764] " anlauf at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: mscfd at gmx dot net @ 2023-11-29 14:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112764

            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 this
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=0)
associate(i1 => x(:,1))
   j => i1(1)
   print *, j
end associate
deallocate(x)

end program assoc_target

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-12-01 17:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-29 14:01 [Bug fortran/112764] New: Associating entity does not have target attribute if selector has pointer attribute in associate block mscfd at gmx dot net
2023-11-29 18:02 ` [Bug fortran/112764] " anlauf at gcc dot gnu.org
2023-11-29 20:09 ` anlauf at gcc dot gnu.org
2023-11-29 20:10 ` anlauf at gcc dot gnu.org
2023-11-29 20:17 ` mscfd at gmx dot net
2023-11-29 20:37 ` anlauf at gcc dot gnu.org
2023-11-29 21:17 ` anlauf at gcc dot gnu.org
2023-11-30 12:38 ` cvs-commit at gcc dot gnu.org
2023-11-30 21:21 ` cvs-commit at gcc dot gnu.org
2023-11-30 21:23 ` anlauf at gcc dot gnu.org
2023-12-01  5:29 ` mscfd at gmx dot net
2023-12-01 17:52 ` anlauf at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).