From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24821 invoked by alias); 20 Mar 2014 14:34:48 -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 24775 invoked by uid 48); 20 Mar 2014 14:34:43 -0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/60563] FAIL: g++.dg/ext/sync-4.C on *-apple-darwin* Date: Thu, 20 Mar 2014 14:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: NEW 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: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-03/txt/msg01861.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60563 --- Comment #8 from Dominique d'Humieres --- > Well - when I build the test -O0,O1,Os it passes. Confirmed when running the test suite. However the following reduced test /* { dg-do run { target hppa*-*-hpux* *-*-linux* *-*-gnu* powerpc*-*-darwin* *-*-darwin[912]* } } */ /* { dg-require-effective-target sync_long_long_runtime } */ /* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */ /* Verify that the builtin functions are correctly marked as trapping when using -fnon-call-exceptions. */ #include #include typedef int ditype __attribute__ ((mode (DI))); #define FN(IDX, RET, CALL) \ static RET f ## IDX (void *p) __attribute__ ((noinline)); \ static RET \ f ## IDX (void *p) \ { \ return CALL; \ } \ static void \ t ## IDX () \ { \ try \ { \ f ## IDX(0); \ } \ catch (...) \ { \ return; \ } \ abort(); \ } FN(18, void, (__atomic_clear((ditype*)p, __ATOMIC_SEQ_CST))) static void handler(int) { sigset_t clear; sigfillset (&clear); sigprocmask (SIG_UNBLOCK, &clear, NULL); throw 0; } int main () { signal (SIGSEGV, handler); signal (SIGBUS, handler); t18(); exit(0); } fails with -O1, but not with -O0 (-m32 and -m64).