public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/18495] New: Intrinisc function SPREAD is broken
@ 2004-11-15  5:36 paulthomas2 at wanadoo dot fr
  2004-11-15  5:43 ` [Bug libfortran/18495] " pinskia at gcc dot gnu dot org
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2004-11-15  5:36 UTC (permalink / raw)
  To: gcc-bugs

Detected a fault in the fortran 90 version of the LLNL "mflops" test.  SPREAD 
is causing a segmentation fault in "KERNEL 21". Replacing this section with 
the fortran77 kernel corrects the fault (BTW will report the benchmarks on the 
gfortran wiki - they do not look too bad at all!).  The fault is caused by:

      DO K = 1, 25
           PX(:,:N) = PX(:,:N) + SPREAD(VY(:25,K),DIM = 2,NCOPIES = N)* &
     &          SPREAD(CX(K,:N),DIM = 1,NCOPIES = 25)
      END DO

where N is 1000

The following codelet gives incorrect results for small N and also segment 
faults for large enough N (eg 1000, as here):

program test_spread
   implicit none
   integer, parameter :: N = 1000
   integer            :: I
   integer, dimension(N) :: source 
   integer, dimension(N,N) :: sink
   do i = 1 , N
      source(i) = N
   end do
   print *,'product'
   sink = spread( source , 1 , N ) * spread( source , N , N )
   print *, sink
   stop
end program test_spread

-- 
           Summary: Intrinisc function SPREAD is broken
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: paulthomas2 at wanadoo dot fr
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2005-05-24 22:23 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-15  5:36 [Bug fortran/18495] New: Intrinisc function SPREAD is broken paulthomas2 at wanadoo dot fr
2004-11-15  5:43 ` [Bug libfortran/18495] " pinskia at gcc dot gnu dot org
2004-11-15 14:58 ` paulthomas2 at wanadoo dot fr
2004-12-02 20:56 ` tobi at gcc dot gnu dot org
2004-12-02 21:05 ` tobi at gcc dot gnu dot org
2005-03-09 23:33 ` Thomas dot Koenig at online dot de
2005-03-25  5:44 ` paulthomas2 at wanadoo dot fr
2005-04-08 15:28 ` fxcoudert at gcc dot gnu dot org
2005-04-13 10:01 ` tkoenig at gcc dot gnu dot org
2005-04-13 19:47 ` tkoenig at gcc dot gnu dot org
2005-04-13 21:27 ` paulthomas2 at wanadoo dot fr
2005-04-14 19:42 ` paulthomas2 at wanadoo dot fr
2005-04-14 21:49 ` tkoenig at gcc dot gnu dot org
2005-04-15  5:07 ` paulthomas2 at wanadoo dot fr
2005-04-15 11:29 ` tkoenig at gcc dot gnu dot org
2005-04-15 17:25 ` tkoenig at gcc dot gnu dot org
2005-04-15 19:39 ` tkoenig at gcc dot gnu dot org
2005-04-15 20:06 ` cvs-commit at gcc dot gnu dot org
2005-04-15 20:30 ` [Bug libfortran/18495] [4.0 only] " tkoenig at gcc dot gnu dot org
2005-05-21 20:34 ` tkoenig at gcc dot gnu dot org
2005-05-21 20:34 ` cvs-commit at gcc dot gnu dot org
2005-05-21 20:35 ` pinskia at gcc dot gnu dot org
2005-05-24 22:23 ` cvs-commit at gcc dot gnu dot org
2005-05-24 22:40 ` 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).