From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32000 invoked by alias); 8 Nov 2013 13:27:29 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 31989 invoked by uid 89); 8 Nov 2013 13:27:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.3 required=5.0 tests=AWL,BAYES_50,RDNS_NONE,SPAM_SUBJECT,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from Unknown (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 08 Nov 2013 13:27:28 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Vem5f-0003LJ-6k from joseph_myers@mentor.com ; Fri, 08 Nov 2013 05:27:11 -0800 Received: from SVR-IES-FEM-02.mgc.mentorg.com ([137.202.0.106]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 8 Nov 2013 05:27:11 -0800 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-02.mgc.mentorg.com (137.202.0.106) with Microsoft SMTP Server id 14.2.247.3; Fri, 8 Nov 2013 13:27:08 +0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.76) (envelope-from ) id 1Vem5b-0001Q9-Br; Fri, 08 Nov 2013 13:27:07 +0000 Date: Fri, 08 Nov 2013 13:34:00 -0000 From: "Joseph S. Myers" To: Dominique Dhumieres CC: , , Subject: Re: Implement C11 _Atomic In-Reply-To: <20131108130701.84B61104@mailhost.lps.ens.fr> Message-ID: References: <20131108130701.84B61104@mailhost.lps.ens.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2013-11/txt/msg00897.txt.bz2 On Fri, 8 Nov 2013, Dominique Dhumieres wrote: > This revision may also causes the failures of > gfortran.dg/typebound_operator_9.f03 and > FAIL: gfortran.fortran-torture/execute/forall_1.f90. I doubt the patch affects Fortran (there are language-independent changes, but they are fairly small and shouldn't affect code not using _Atomic qualifiers). > Undefined symbols for architecture i386: > "___atomic_compare_exchange_16", referenced from: > "___atomic_load_16", referenced from: Either those functions should be in libatomic (using locking where necessary), or the built-in functions should be expanding to use the size-generic libatomic function rather than the _16 one. Richard or Andrew should be able to advise on which the design was for systems that don't have lock-free atomics for all of the standard sizes (1, 2, 4, 8, 16). My guess is that it would be hard to provide the _16 functions in libatomic when TImode types aren't supported, and so the bug is that _16 function calls are generated when not supported. That is, c-common.c functions resolve_overloaded_atomic_exchange, resolve_overloaded_atomic_compare_exchange, resolve_overloaded_atomic_load, resolve_overloaded_atomic_store, where they check n != 16, should do something like (n != 16 || !targetm.scalar_mode_supported_p (TImode)). (Better, refactor the (n != 1 && n != 2 && n != 4 && n != 8 && n != 16) into an atomic_size_supported_p or similar function.) -- Joseph S. Myers joseph@codesourcery.com