public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/100094] New: Undefined pointers have incorrect rank when using optimization
@ 2021-04-15 10:07 jrfsousa at gmail dot com
  2021-04-15 15:55 ` [Bug fortran/100094] " kargl at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: jrfsousa at gmail dot com @ 2021-04-15 10:07 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100094
           Summary: Undefined pointers have incorrect rank when using
                    optimization
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jrfsousa at gmail dot com
  Target Milestone: ---

Created attachment 50599
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50599&action=edit
Fortran code showing problem

Hi All!

Rank information is not correctly written into the pointer descriptor when
using optimization or -ffpe-trap.

Seen on:

GNU Fortran (GCC) 11.0.1 20210415 (experimental)
GNU Fortran (GCC) 10.3.1 20210415

Thank you very much.

Best regards,
José Rui

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

* [Bug fortran/100094] Undefined pointers have incorrect rank when using optimization
  2021-04-15 10:07 [Bug fortran/100094] New: Undefined pointers have incorrect rank when using optimization jrfsousa at gmail dot com
@ 2021-04-15 15:55 ` kargl at gcc dot gnu.org
  2021-04-16 13:33 ` dominiq at lps dot ens.fr
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: kargl at gcc dot gnu.org @ 2021-04-15 15:55 UTC (permalink / raw)
  To: gcc-bugs

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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #1 from kargl at gcc dot gnu.org ---
Isn't the code invalid Fortran because it references an undefined pointer?
If yes, the compiler is allows to do whatever it wants with the code.

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

* [Bug fortran/100094] Undefined pointers have incorrect rank when using optimization
  2021-04-15 10:07 [Bug fortran/100094] New: Undefined pointers have incorrect rank when using optimization jrfsousa at gmail dot com
  2021-04-15 15:55 ` [Bug fortran/100094] " kargl at gcc dot gnu.org
@ 2021-04-16 13:33 ` dominiq at lps dot ens.fr
  2021-04-16 23:18 ` jrfsousa at gmail dot com
  2023-06-01 14:19 ` pault at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: dominiq at lps dot ens.fr @ 2021-04-16 13:33 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-04-16
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Confirmed.

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

* [Bug fortran/100094] Undefined pointers have incorrect rank when using optimization
  2021-04-15 10:07 [Bug fortran/100094] New: Undefined pointers have incorrect rank when using optimization jrfsousa at gmail dot com
  2021-04-15 15:55 ` [Bug fortran/100094] " kargl at gcc dot gnu.org
  2021-04-16 13:33 ` dominiq at lps dot ens.fr
@ 2021-04-16 23:18 ` jrfsousa at gmail dot com
  2023-06-01 14:19 ` pault at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jrfsousa at gmail dot com @ 2021-04-16 23:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from José Rui Faustino de Sousa <jrfsousa at gmail dot com> ---
(In reply to kargl from comment #1)
> Isn't the code invalid Fortran because it references an undefined pointer?
> If yes, the compiler is allows to do whatever it wants with the code.

AFAIK that is correct off all the "associate-like" constructs, the only
exception is select rank.

11.1.10.3 Attributes of a SELECT RANK associate name, paragraph 3:

"The associating entity has the ALLOCATABLE, POINTER, or TARGET attribute if
the selector has that attribute. The other attributes of the associating entity
are described in 11.1.3.3."

Best regards,
José Rui

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

* [Bug fortran/100094] Undefined pointers have incorrect rank when using optimization
  2021-04-15 10:07 [Bug fortran/100094] New: Undefined pointers have incorrect rank when using optimization jrfsousa at gmail dot com
                   ` (2 preceding siblings ...)
  2021-04-16 23:18 ` jrfsousa at gmail dot com
@ 2023-06-01 14:19 ` pault at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pault at gcc dot gnu.org @ 2023-06-01 14:19 UTC (permalink / raw)
  To: gcc-bugs

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

Paul Thomas <pault at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING
             Blocks|87477                       |

--- Comment #4 from Paul Thomas <pault at gcc dot gnu.org> ---
Hi Jose,

This seems to me to have fixed itself.

I'll put the PR to "waiting" until you confirm (or not!).

I have also stopped it from blocking the associate meta-bug 87477.

Thanks

Paul


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87477
[Bug 87477] [meta-bug] [F03] issues concerning the ASSOCIATE statement

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

end of thread, other threads:[~2023-06-01 14:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15 10:07 [Bug fortran/100094] New: Undefined pointers have incorrect rank when using optimization jrfsousa at gmail dot com
2021-04-15 15:55 ` [Bug fortran/100094] " kargl at gcc dot gnu.org
2021-04-16 13:33 ` dominiq at lps dot ens.fr
2021-04-16 23:18 ` jrfsousa at gmail dot com
2023-06-01 14:19 ` pault 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).