summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsbrandt <sbrandt@17b73243-c579-4c4c-a9d2-2d5706c11dac>2014-06-18 18:48:33 +0000
committersbrandt <sbrandt@17b73243-c579-4c4c-a9d2-2d5706c11dac>2014-06-18 18:48:33 +0000
commit89e3ac45a68a776a1f788a5495862c379c514dd5 (patch)
treecccf41a2ad3b79989a8a6ecaa0a4d50daa96486b
parent2ea9bc5bfe361956caf3b5a945d595a9b5a3f8c9 (diff)
Ticket #1634
git-svn-id: http://svn.cactuscode.org/flesh/trunk@5121 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r--lib/make/cctk_Config.h.in10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/make/cctk_Config.h.in b/lib/make/cctk_Config.h.in
index 8a8a51fe..aee90a00 100644
--- a/lib/make/cctk_Config.h.in
+++ b/lib/make/cctk_Config.h.in
@@ -598,10 +598,14 @@ typedef enum {false, true} bool;
/* Whether __builtin_unreachable exists. */
#undef HAVE_CCTK_CXX_BUILTIN_UNREACHABLE
-#ifdef HAVE_CCTK_CXX_BUILTIN_UNREACHABLE
-# define CCTK_BUILTIN_UNREACHABLE __builtin_unreachable
+#ifdef __CUDACC__
+# define CCTK_BUILTIN_UNREACHABLE() asm("trap;")
#else
-# define CCTK_BUILTIN_UNREACHABLE() CCTK_Abort(0, 1)
+# ifdef HAVE_CCTK_CXX_BUILTIN_UNREACHABLE
+# define CCTK_BUILTIN_UNREACHABLE __builtin_unreachable
+# else
+# define CCTK_BUILTIN_UNREACHABLE() CCTK_Abort(0, 1)
+# endif
#endif
/* Whether __builtin_assume_aligned exists. */