From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129802 invoked by alias); 5 Jun 2015 15:28:28 -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 Received: (qmail 129736 invoked by uid 48); 5 Jun 2015 15:28:19 -0000 From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/66348] Simple loop has only lower half of the 64-bit counter initialized correctly Date: Fri, 05 Jun 2015 15:28:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-06/txt/msg00501.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D66348 --- Comment #8 from Uro=C5=A1 Bizjak --- (In reply to Sebastiano Vigna from comment #0) > The loop commented as "problematic loop" is compiled (with -O3) as >=20 > xorl %eax, %eax # i > > That is, the loop index i is in %rax, but only the lower half is zeroed at > the start of the loop. When we enter the loop with a large (>32-bit) valu= e, > the loop never ends. This happens already with -O1. We had to #pragma the > function to -O0 to make it work. If you are referring to the xorl insn above, then rest assured that it zero= es the whole 64bit register. Your bug is elsewhere. >>From gcc-bugs-return-488170-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jun 05 15:52:32 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 71164 invoked by alias); 5 Jun 2015 15:52:32 -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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 71113 invoked by uid 48); 5 Jun 2015 15:52:28 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/63860] Ill-formed std::pair::swap implementation? Date: Fri, 05 Jun 2015 15:52:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 6.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution target_milestone Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-06/txt/msg00502.txt.bz2 Content-length: 647 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63860 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Target Milestone|5.2 |6.0 --- Comment #8 from Jonathan Wakely --- Should be fixed on trunk by r224153 I don't see any point fixing it for 5.2 since G++ and Clang already accept the ill-formed code, and aren't going to suddenly stop doing so.