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