public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/113928] New: Aliasing of pointer in expression
@ 2024-02-15 10:37 eddyg_61-bugzilla at yahoo dot it
  2024-02-16  9:43 ` [Bug fortran/113928] " rguenth at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: eddyg_61-bugzilla at yahoo dot it @ 2024-02-15 10:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113928
           Summary: Aliasing of pointer in expression
           Product: gcc
           Version: 11.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eddyg_61-bugzilla at yahoo dot it
  Target Milestone: ---

I think that this program gives an erroneous result:

program wzerror
    implicit none
    integer, parameter :: N = 20
    complex, target :: wz(N)
    real, pointer :: wr(:)
    integer :: i

    wr => wz%re
    wz = 0
    wr = [(i,i=1,N)]
    wr = wr + wz(N:1:-1)%re

    print *, wr
end program

It doesn't recognize the aliasing in the expression that should be allowed when
pointers are involved.
I'm expecting a list of '21'. But this is not the case.

I couldn't test on a more recent compiler.

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

* [Bug fortran/113928] Aliasing of pointer in expression
  2024-02-15 10:37 [Bug fortran/113928] New: Aliasing of pointer in expression eddyg_61-bugzilla at yahoo dot it
@ 2024-02-16  9:43 ` rguenth at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-02-16  9:43 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |13.2.1, 14.0

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed also with GCC 13 and trunk.

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

end of thread, other threads:[~2024-02-16  9:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-15 10:37 [Bug fortran/113928] New: Aliasing of pointer in expression eddyg_61-bugzilla at yahoo dot it
2024-02-16  9:43 ` [Bug fortran/113928] " rguenth 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).