From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32176 invoked by alias); 12 Dec 2010 19:22:28 -0000 Received: (qmail 32156 invoked by uid 22791); 12 Dec 2010 19:22:27 -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; Sun, 12 Dec 2010 19:22:19 +0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/46909] [4.6 Regression] elf32-i386.c and elf64-x86-64.c in binutils are miscompiled 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: X-Bugzilla-Severity: blocker X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.0 X-Bugzilla-Changed-Fields: Status Last reconfirmed Ever Confirmed Severity 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: Sun, 12 Dec 2010 19:22: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/msg01309.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46909 H.J. Lu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2010.12.12 19:22:15 Ever Confirmed|0 |1 Severity|normal |blocker --- Comment #3 from H.J. Lu 2010-12-12 19:22:15 UTC --- [hjl@gnu-6 tmp]$ cat y.c extern void abort (); struct entry { unsigned char tls_type; } h; int __attribute__ ((__noinline__)) foo (struct entry *h) { int tls_type = h->tls_type; if (! ((tls_type) == 4 || ((tls_type) == (2 | 4))) || ((tls_type) == 2 || ((tls_type) == (2 | 4)))) return 1; return -1; } int main () { struct entry h; h.tls_type = 6; if (foo (&h) != 1) abort (); return 0; } [hjl@gnu-6 tmp]$ /usr/gcc-4.6/bin/gcc -O2 y.c [hjl@gnu-6 tmp]$ ./a.out Aborted [hjl@gnu-6 tmp]$ gcc -O2 y.c [hjl@gnu-6 tmp]$ ./a.out [hjl@gnu-6 tmp]$