From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24949 invoked by alias); 6 Oct 2011 13:35:46 -0000 Received: (qmail 24913 invoked by uid 22791); 6 Oct 2011 13:35:45 -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:35:27 +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:35: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: Status Last reconfirmed Ever Confirmed 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/msg00324.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50628 Richard Guenther changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011-10-06 Ever Confirmed|0 |1 --- Comment #2 from Richard Guenther 2011-10-06 13:34:38 UTC --- PRE now changes -: D.2317 = VIEW_CONVERT_EXPR(__complex__ (4.5e+1, 0.0)); D.2317.e2 = 0; - D.2329_19 = REALPART_EXPR (D.2317)>; + D.2329_19 = 0.0; D.2330_20 = IMAGPART_EXPR (D.2317)>; - D.2331_21 = D.2329_19 != 4.5e+1; + D.2331_21 = 1; D.2332_22 = D.2330_20 != 0.0; - D.2333_23 = D.2332_22 | D.2331_21; - if (D.2333_23 == 1) but you can see that the transform is correct - __complex__ (4.5e+1, 0.0) is stored to D.2317 but then the realpart is overwritten by a boolean(kind=4) false. Which is interpreted as 0.0 by REALPART_EXPR (D.2317)>; thus the D.2329_19 != 4.5e+1 is always true. that's the e1 (7) test. Without PRE it fails at the g4 (2) test (via FRE). I suppose the frontend eventually fails foul of aliasing issues here? Reduced testcase: complex function f2 (a) integer a logical e2 entry e2 (a) if (a .gt. 0) then e2 = a .lt. 46 else f2 = 45 endif end function program entrytest complex f2 if (f2 (0) .ne. 45) call abort () end