From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3740 invoked by alias); 28 Dec 2013 10:29:11 -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 3709 invoked by uid 48); 28 Dec 2013 10:29:08 -0000 From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/59615] "asm goto" output or at least clobbered operands Date: Sat, 28 Dec 2013 10:29: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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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: 2013-12/txt/msg02290.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D59615 --- Comment #2 from Uro=C5=A1 Bizjak --- Looking at the assembly, you probably want: --cut here-- int test (int a, int b, int c) { unsigned r =3D a + b; if (r < (unsigned) a) return 1; else if (r > c) return 1; return 0; } --cut here-- gcc-4.8.2 -O2: test: addl %esi, %edi movl $1, %eax jc .L2 xorl %eax, %eax cmpl %edx, %edi seta %al .L2: rep ret Please note how the compiler is able to generate jc without compare insn. >>From gcc-bugs-return-438636-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Dec 28 10:38:30 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 8421 invoked by alias); 28 Dec 2013 10:38:30 -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 8385 invoked by uid 48); 28 Dec 2013 10:38:26 -0000 From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/59615] "asm goto" output or at least clobbered operands Date: Sat, 28 Dec 2013 10:38: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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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: 2013-12/txt/msg02291.txt.bz2 Content-length: 263 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D59615 --- Comment #3 from Uro=C5=A1 Bizjak --- (In reply to Uro=C5=A1 Bizjak from comment #2) > if (r < (unsigned) a) Explicit cast is not needed here, the compiler will do it for you. >>From gcc-bugs-return-438637-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Dec 28 10:39:21 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 9184 invoked by alias); 28 Dec 2013 10:39:21 -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 9155 invoked by uid 48); 28 Dec 2013 10:39:17 -0000 From: "tkoenig at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/59604] Constant comparisons with -fno-range-check and int(z'...') Date: Sat, 28 Dec 2013 10:39: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-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tkoenig at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: tkoenig at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on assigned_to everconfirmed 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: 2013-12/txt/msg02292.txt.bz2 Content-length: 573 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59604 Thomas Koenig changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2013-12-28 Assignee|unassigned at gcc dot gnu.org |tkoenig at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #6 from Thomas Koenig --- I have a patch.