public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/38135]  New: FORALL gives wrong result
@ 2008-11-15 15:57 burnus at gcc dot gnu dot org
  2008-11-15 16:12 ` [Bug fortran/38135] " burnus at gcc dot gnu dot org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-11-15 15:57 UTC (permalink / raw)
  To: gcc-bugs

I expect that the following program prints:

    1    2    2
    2    1    2
    2    2    1
    1    0    0    0

which works with g95 and ifort, but with gfortran one gets:
    1    1*****
   72    1    1
*****   72    1
    1    0    0    0

The program is a minutely modified version of the program posted to c.l.f by
James Van Buskirk at
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/e7ec475ff7935804

integer, parameter :: N = 3
integer A(N,N)
A(1:N,1:N)=reshape([integer::],[N,N],reshape([1],[N+1],[2]))
write(*,'(3i5)') A
write(*,'(4i5)') reshape([1],[N+1],[0])
end


-- 
           Summary: FORALL gives wrong result
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


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

end of thread, other threads:[~2008-11-23 15:18 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-15 15:57 [Bug fortran/38135] New: FORALL gives wrong result burnus at gcc dot gnu dot org
2008-11-15 16:12 ` [Bug fortran/38135] " burnus at gcc dot gnu dot org
2008-11-15 17:20 ` tkoenig at gcc dot gnu dot org
2008-11-16  9:05 ` [Bug fortran/38135] RESHAPE " tkoenig at gcc dot gnu dot org
2008-11-16 11:39 ` mikael at gcc dot gnu dot org
2008-11-16 13:47 ` mikael at gcc dot gnu dot org
2008-11-16 13:59 ` tkoenig at gcc dot gnu dot org
2008-11-16 15:23 ` mikael at gcc dot gnu dot org
2008-11-16 16:05 ` tkoenig at gcc dot gnu dot org
2008-11-16 18:48 ` mikael at gcc dot gnu dot org
2008-11-16 19:46 ` mikael at gcc dot gnu dot org
2008-11-16 20:39 ` tkoenig at gcc dot gnu dot org
2008-11-16 22:26 ` pault at gcc dot gnu dot org
2008-11-18 22:46 ` tkoenig at gcc dot gnu dot org
2008-11-19 19:35 ` tkoenig at gcc dot gnu dot org
2008-11-19 20:57 ` mikael at gcc dot gnu dot org
2008-11-23 15:11 ` tkoenig at gcc dot gnu dot org
2008-11-23 15:11 ` tkoenig at gcc dot gnu dot org
2008-11-23 15:18 ` tkoenig at gcc dot gnu dot 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).