aboutsummaryrefslogtreecommitdiffstats
path: root/test/FrontendC/2003-08-06-BuiltinSetjmpLongjmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/FrontendC/2003-08-06-BuiltinSetjmpLongjmp.c')
-rw-r--r--test/FrontendC/2003-08-06-BuiltinSetjmpLongjmp.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/FrontendC/2003-08-06-BuiltinSetjmpLongjmp.c b/test/FrontendC/2003-08-06-BuiltinSetjmpLongjmp.c
new file mode 100644
index 0000000..39412e5
--- /dev/null
+++ b/test/FrontendC/2003-08-06-BuiltinSetjmpLongjmp.c
@@ -0,0 +1,14 @@
+/* RUN: %llvmgcc -xc %s -c -o - | llvm-dis | not grep __builtin_
+ *
+ * __builtin_longjmp/setjmp should get transformed into llvm.setjmp/longjmp
+ * just like explicit setjmp/longjmp calls are.
+ */
+
+void jumpaway(int *ptr) {
+ __builtin_longjmp(ptr,1);
+}
+
+int main(void) {
+ __builtin_setjmp(0);
+ jumpaway(0);
+}