From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28439 invoked by alias); 9 Dec 2010 22:50:32 -0000 Received: (qmail 28341 invoked by uid 22791); 9 Dec 2010 22:50:31 -0000 X-SWARE-Spam-Status: No, hits=-2.8 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; Thu, 09 Dec 2010 22:50:26 +0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/46842] [4.6 Regression] wrong results with MATHMUL(..., TRANSPOSE (func ())) -- 465.tonto test run miscompares X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.0 X-Bugzilla-Changed-Fields: Keywords Summary 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 Date: Thu, 09 Dec 2010 22:50:00 -0000 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: 2010-12/txt/msg01058.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46842 Tobias Burnus changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code Summary|[4.6 Regression] 465.tonto |[4.6 Regression] wrong |test run miscompares (even |results with MATHMUL(..., |with -O0) |TRANSPOSE (func ())) -- | |465.tonto test run | |miscompares --- Comment #16 from Tobias Burnus 2010-12-09 22:50:08 UTC --- Thanks to Sebastian for some debugging help. Reduced test case below. Older gfortrans and other compilers produce (correct): 4.0000000 4.0000000 6.0000000 6.0000000 The current 4.6 gfortran produces (wrong): 3.0000000 3.0000000 7.0000000 7.0000000 implicit none call sub() contains subroutine sub() real, dimension(2,2) :: b b = 1.0 b = matmul(b,transpose(func())) print *, b end subroutine function func() result(res) real, dimension(2,2) :: res res = reshape([1,2,3,4], [2,2]) end function end