public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/58085] New: Wrong indexing of an array in ASSOCIATE
@ 2013-08-05 11:27 vladimir.fuka at gmail dot com
  2013-08-08 17:20 ` [Bug fortran/58085] " dominiq at lps dot ens.fr
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: vladimir.fuka at gmail dot com @ 2013-08-05 11:27 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58085
           Summary: Wrong indexing of an array in ASSOCIATE
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vladimir.fuka at gmail dot com

Program:

     real c(3,3)
     associate (x=>shape(c))
       print *,lbound(x)
       print *,ubound(x)
       print *,x(1),x(2)
     end associate
    end

Expected result:
    1
    2
    3 3

Actual result:
     >gfortran-4.7 indresult.f90 
     > ./a.out 
           1
           2
           3   990059265
     >gfortran-4.8 indresult.f90 
     > ./a.out 
           1
           2
           3           0

,but:

     print *,x(0),x(1) ! bound checks off

    -->

     3 3


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

end of thread, other threads:[~2014-04-13 11:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-05 11:27 [Bug fortran/58085] New: Wrong indexing of an array in ASSOCIATE vladimir.fuka at gmail dot com
2013-08-08 17:20 ` [Bug fortran/58085] " dominiq at lps dot ens.fr
2014-04-13 11:56 ` pault at gcc dot gnu.org
2014-04-13 11:59 ` 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).