From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18510 invoked by alias); 25 Jan 2011 16:41:09 -0000 Received: (qmail 18419 invoked by uid 22791); 25 Jan 2011 16:41:08 -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; Tue, 25 Jan 2011 16:41:03 +0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/47460] Inconsistent behaviour of __sync_fetch_and_add builtin? X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: 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: Tue, 25 Jan 2011 16:48: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: 2011-01/txt/msg02677.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47460 --- Comment #1 from Jonathan Wakely 2011-01-25 16:40:50 UTC --- This seems more appropriate as a question to the gcc-help list requesting clarification, not a bug report. To answer part of it ... (In reply to comment #0) > I get the unexpected (for me) inconsistent behaviour of the > __sync_fetch_and_add builtin with the program below. My main confusion is > around the missing __sync_val_compare_and_swap_{1,2,4} when not explicitely > specifying the architecture in GCC 4.4.5, but availability in all other tried > variants. You need to look at the output of 'gcc -v' to see if each GCC was built with --with-arch, which specifies a default value for -march. Prior to GCC 4.5, the default arch was i386 unless GCC was built with the --with-arch switch. Since GCC 4.5 the default arch is implied by the target machine.