public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/60091] New: Misleading error messages in rank-2 pointer assignment to rank-1 target
@ 2014-02-06  8:22 loximann at gmail dot com
  2014-02-08 12:38 ` [Bug fortran/60091] " dominiq at lps dot ens.fr
  0 siblings, 1 reply; 2+ messages in thread
From: loximann at gmail dot com @ 2014-02-06  8:22 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60091

            Bug ID: 60091
           Summary: Misleading error messages in rank-2 pointer assignment
                    to rank-1 target
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: loximann at gmail dot com

Compiler version: 4.9.0 20130917 (experimental) [trunk revision 202647]

Test program:

program test
    real, target :: a(9)=1.
    real, pointer :: p(:,:)

    p(:,:)=>a          ! (a) Error: Lower bound has to be present at (1)
    p(1:,1:)=>a        ! (b) Error: Different ranks in pointer assignment at
(1)
    p(1:3,1:)=>a       ! (c) Error: Either all or none of the upper bounds must
be specified at (1)
    p(1:3,1:3)=>a

end program

According to Note 7.48, "It is possible to obtain different-rank views of parts
of an object by specifying upper bounds in pointer assignment statements."

In my opinion, the error in all (a), (b) and (c) should be in the lines of
"Different ranks in pointer assignment at (1). All lower and upper bounds must
be specified".


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

* [Bug fortran/60091] Misleading error messages in rank-2 pointer assignment to rank-1 target
  2014-02-06  8:22 [Bug fortran/60091] New: Misleading error messages in rank-2 pointer assignment to rank-1 target loximann at gmail dot com
@ 2014-02-08 12:38 ` dominiq at lps dot ens.fr
  0 siblings, 0 replies; 2+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-02-08 12:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60091

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-02-08
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Confirmed and I agree that three attempts to get the correct syntax could be
frustrating.


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

end of thread, other threads:[~2014-02-08 12:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-06  8:22 [Bug fortran/60091] New: Misleading error messages in rank-2 pointer assignment to rank-1 target loximann at gmail dot com
2014-02-08 12:38 ` [Bug fortran/60091] " dominiq at lps dot ens.fr

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).