From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9705 invoked by alias); 6 Oct 2011 13:51:17 -0000 Received: (qmail 9653 invoked by uid 22791); 6 Oct 2011 13:51:15 -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; Thu, 06 Oct 2011 13:51:02 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/50628] [4.7 Regression] gfortran.fortran-torture/execute/entry_4.f fails Date: Thu, 06 Oct 2011 13:51:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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.7.0 X-Bugzilla-Changed-Fields: CC 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/msg00328.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50628 Richard Guenther changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jamborm at gcc dot gnu.org --- Comment #3 from Richard Guenther 2011-10-06 13:50:42 UTC --- Looks like SRA messes up: f2 (integer(kind=4) * a) { + complex(kind=4) D.1794; + complex(kind=4) SR.5; + logical(kind=4) SR.4; integer(kind=4) D.1791; logical(kind=4) D.1790; union munion.0.f2 D.1789; @@ -181,8 +79,11 @@ : D.1789 = __result_master.0.f2; - __result = D.1789; - D.1779_2 = __result.f2; + SR.4_11 = __result_master.0.f2.e2; + D.1789.e2 = SR.4_11; + D.1794_12 = VIEW_CONVERT_EXPR(D.1789); + SR.5_14 = D.1794_12; + D.1779_2 = SR.5_14; return D.1779_2; that looks like quite a stupit transform (the load and the store, using logical(kind=4) which has the right size but precision 1 - and thus truncates!)! FRE then goes and does __result_master.0.f2.f2 = __complex__ (4.5e+1, 0.0); D.1808 = __result_master.0.f2; SR.7_12 = __result_master.0.f2.e2; - SR.4_6 = __result_master.0.f2.e2; + SR.4_6 = 0; SR.7_8 = SR.4_6; D.1808.e2 = SR.7_8; D.1802_7 = VIEW_CONVERT_EXPR(D.1808); because it simply interprets bit zero of 4.5e+1. Martin?