From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7331 invoked by alias); 9 Oct 2011 09:48:26 -0000 Received: (qmail 7320 invoked by uid 22791); 9 Oct 2011 09:48:25 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 09 Oct 2011 09:48:12 +0000 From: "paul.richard.thomas at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/43829] Scalarization of reductions Date: Sun, 09 Oct 2011 09:48:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: paul.richard.thomas at gmail dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mikael at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2011-10/txt/msg00623.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43829 --- Comment #44 from paul.richard.thomas at gmail dot com 2011-10-09 09:48:00 UTC --- Dear Mikael, I have duly loaded up your patch - it looks very slick and professional; it even works as intended! >> > This is included in the patch in comment #41. Unfortunately, it makes the test > (comment #42) fail with -Os in the testsuite. I don't know yet how I will > handle it. I would like to avoid forcing one optimization level if possible. > Any idea? I confirm you finding: FAIL: gfortran.dg/function_optimize_7.f90 -O scan-tree-dump-times original "sum_r4" 1 FAIL: gfortran.dg/inline_sum_1.f90 -Os (test for excess errors) FAIL: gfortran.dg/select_type_12.f03 -O (internal compiler error) FAIL: gfortran.dg/select_type_12.f03 -O (test for excess errors) Running /svn/trunk/gcc/testsuite/gfortran.dg/gomp/gomp.exp ... Running /svn/trunk/gcc/testsuite/gfortran.dg/graphite/graphite.exp ... Running /svn/trunk/gcc/testsuite/gfortran.dg/guality/guality.exp ... Running /svn/trunk/gcc/testsuite/gfortran.dg/lto/lto.exp ... Running /svn/trunk/gcc/testsuite/gfortran.dg/vect/vect.exp ... Running /svn/trunk/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp ... Running /svn/trunk/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp ... FAIL: gfortran.fortran-torture/execute/entry_4.f90 execution, -O2 FAIL: gfortran.fortran-torture/execute/entry_4.f90 execution, -O2 -fomit-frame-pointer -finline-functions FAIL: gfortran.fortran-torture/execute/entry_4.f90 execution, -O2 -fomit-frame-pointer -finline-functions -funroll-loops FAIL: gfortran.fortran-torture/execute/entry_4.f90 execution, -O2 -fbounds-check FAIL: gfortran.fortran-torture/execute/entry_4.f90 execution, -O3 -g FAIL: gfortran.fortran-torture/execute/entry_4.f90 execution, -O2 -ftree-vectorize -msse2 The function_optimize_7.f90 failure is obviously trivial. Both the select_type_12.f03 and the entry_4.f90 failures have crept in during the last few days and appear to be some middle-end fault. As for your inline_sum_1.f90: The failure here is dues to extra temporary array warnings with -Os. I tried switching on and off the extra optimizations in Os versus O2 but could not identify the culprit. That said, the test runs correctly with -Os. What I would do is to double up the test; one with { dg-do compile } and -Warray-temporaries and trhe other with { dg-do run } only. Cheers Paul