From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3784 invoked by alias); 15 Nov 2004 05:36:27 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 3762 invoked by uid 48); 15 Nov 2004 05:36:23 -0000 Date: Mon, 15 Nov 2004 05:36:00 -0000 From: "paulthomas2 at wanadoo dot fr" To: gcc-bugs@gcc.gnu.org Message-ID: <20041115053618.18495.paulthomas2@wanadoo.fr> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug fortran/18495] New: Intrinisc function SPREAD is broken X-Bugzilla-Reason: CC X-SW-Source: 2004-11/txt/msg01830.txt.bz2 List-Id: 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