public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/33354]  New: MINLOC in combination with SUM gives wrong result
@ 2007-09-08 13:02 enok at lysator dot liu dot se
  2007-09-08 15:31 ` [Bug fortran/33354] " kargl at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: enok at lysator dot liu dot se @ 2007-09-08 13:02 UTC (permalink / raw)
  To: gcc-bugs

A simple program should print "1" but prints "2". Of some reason MINLOC fails
to find the minium location (first location) for the SUM expression.

PROGRAM TST
  IMPLICIT NONE
  REAL :: A(1,3)
  A(:,1) = 10
  A(:,2) = 20
  A(:,3) = 30
  WRITE(*,*) SUM(A(:,1:3),1)
  WRITE(*,*) MINLOC(SUM(A(:,1:3),1),1)
END PROGRAM TST

bash%> gfortran -o tst tst.f90
bash%> ./tst
   10.00000       20.00000       30.00000
           2
bash%>


-- 
           Summary: MINLOC in combination with SUM gives wrong result
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: enok at lysator dot liu dot se
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2007-10-15 18:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-08 13:02 [Bug fortran/33354] New: MINLOC in combination with SUM gives wrong result enok at lysator dot liu dot se
2007-09-08 15:31 ` [Bug fortran/33354] " kargl at gcc dot gnu dot org
2007-09-08 16:16 ` burnus at gcc dot gnu dot org
2007-09-11 18:37 ` pault at gcc dot gnu dot org
2007-09-22  8:53 ` [Bug fortran/33354] [4.2 only] " tkoenig at gcc dot gnu dot org
2007-09-29  7:58 ` tobi at gcc dot gnu dot org
2007-09-29  8:00 ` tobi at gcc dot gnu dot org
2007-09-29 13:12 ` tkoenig at gcc dot gnu dot org
2007-09-30 20:56 ` enok at lysator dot liu dot se
2007-09-30 21:03 ` tkoenig at gcc dot gnu dot org
2007-10-02 18:09 ` tkoenig at gcc dot gnu dot org
2007-10-02 18:51 ` tobi at gcc dot gnu dot org
2007-10-15 18:24 ` tkoenig at gcc dot gnu dot org
2007-10-15 18:24 ` 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).