public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-60563-4-75OYIkn94w@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-60563-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60563

--- Comment #8 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> 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 <stdlib.h>
#include <signal.h>

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).


  parent reply	other threads:[~2014-03-20 14:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-18 10:18 [Bug target/60563] New: " dominiq at lps dot ens.fr
2014-03-18 22:31 ` [Bug target/60563] " dominiq at lps dot ens.fr
2014-03-19  3:39 ` ian at gcc dot gnu.org
2014-03-19  3:44 ` ian at airs dot com
2014-03-20 11:29 ` iains at gcc dot gnu.org
2014-03-20 14:31 ` dominiq at lps dot ens.fr
2014-03-20 14:32 ` dominiq at lps dot ens.fr
2014-03-20 14:33 ` dominiq at lps dot ens.fr
2014-03-20 14:34 ` dominiq at lps dot ens.fr [this message]
2014-03-20 21:29 ` iains at gcc dot gnu.org
2014-12-19  0:18 ` howarth at bromo dot med.uc.edu
2015-02-11 22:04 ` howarth at bromo dot med.uc.edu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-60563-4-75OYIkn94w@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).