From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1467 invoked by alias); 26 Apr 2008 04:28:40 -0000 Received: (qmail 1287 invoked by uid 48); 26 Apr 2008 04:27:57 -0000 Date: Sat, 26 Apr 2008 04:28:00 -0000 Message-ID: <20080426042757.1286.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/35993] [4.3/4.4 regression] wrong answer for PRODUCT with scalar mask In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jvdelisle 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: 2008-04/txt/msg01865.txt.bz2 ------- Comment #4 from jvdelisle at gcc dot gnu dot org 2008-04-26 04:27 ------- This problem is worse then thought. It also extends to the SUM intrinsic which uses a similar code pattern. When MASK is a scalar and false the code that should traverse the destination array and set the values to 1 for PRODUCT and 0 for SUM just flat does not do that. It does not traverse each element of the return array (dest) for (n = 0; n < rank; n++) dest[n * dstride] = 1 ; Also the rank is set to the source array rank rather than the return array array rank, which is also wrong. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35993