summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-14 04:06:48 +0000
committerChris Lattner <sabre@nondot.org>2004-02-14 04:06:48 +0000
commit208d08044437815ab1101c881720c133b6ff58ae (patch)
tree96dee814f7a27bef591b5ed524f3e1a645b52655 /test
parent90cf614aa5dcf7842b60e91cea96be50faf82b0b (diff)
downloadexternal_llvm-208d08044437815ab1101c881720c133b6ff58ae.zip
external_llvm-208d08044437815ab1101c881720c133b6ff58ae.tar.gz
external_llvm-208d08044437815ab1101c881720c133b6ff58ae.tar.bz2
Testcase for builtin frame/return address
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11436 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CFrontend/2004-02-13-BuiltinFrameReturnAddress.c.tr8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CFrontend/2004-02-13-BuiltinFrameReturnAddress.c.tr b/test/CFrontend/2004-02-13-BuiltinFrameReturnAddress.c.tr
new file mode 100644
index 0000000..288593c
--- /dev/null
+++ b/test/CFrontend/2004-02-13-BuiltinFrameReturnAddress.c.tr
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep 'llvm.*address' | wc -l | grep 4
+
+void *test1() {
+ return __builtin_return_address(1);
+}
+void *test2() {
+ return __builtin_frame_address(0);
+}