From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24489 invoked by alias); 12 Mar 2007 05:38:04 -0000 Received: (qmail 22800 invoked by uid 48); 12 Mar 2007 05:37:53 -0000 Date: Mon, 12 Mar 2007 05:38:00 -0000 Message-ID: <20070312053753.22799.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/31139] sum(w_re(1:nn,1)*fi(i(1:nn, ii))) up to 3.5x slower than C version In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-03/txt/msg01031.txt.bz2 ------- Comment #4 from pinskia at gcc dot gnu dot org 2007-03-12 05:37 ------- > The hand-made SSE version (USE_VECTORS) crashes here for -m32 Because well complex(8)'s alignment is the same as double which means it is only 8 byte aligned and not 16 byte aligned, it is just magical that the SSE case works for -m64 also. I am thinking about declaring this bug as invalid as right now the C testcase is not even closely related to the Fortran case. Can someone try instead of doing "__real__ a += w[j ] * __real__ mfi[*index ];" Use "a+= xxx* yyy" and also use -std=c99 to get the correct multiplication? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31139