summaryrefslogtreecommitdiffstats
path: root/tests/testfile_implicit_pointer.c
diff options
context:
space:
mode:
authorChih-hung Hsieh <chh@google.com>2015-09-25 14:51:48 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-09-25 14:51:48 +0000
commitb0121c5547604527aaeea297b54047cd14b234df (patch)
tree7d9031ee3d5796de4a1825892fc6e04ba6e36ae2 /tests/testfile_implicit_pointer.c
parentd03895cf5f8b77c6a85abcd84ea0d80ff56be846 (diff)
parent5eafdf0f9bfd9a3c5f93414ac16bb399b6da0b7f (diff)
downloadandroid_external_elfutils-b0121c5547604527aaeea297b54047cd14b234df.tar.gz
android_external_elfutils-b0121c5547604527aaeea297b54047cd14b234df.tar.bz2
android_external_elfutils-b0121c5547604527aaeea297b54047cd14b234df.zip
Merge "Move files up to match upstream source structure."
Diffstat (limited to 'tests/testfile_implicit_pointer.c')
-rw-r--r--tests/testfile_implicit_pointer.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/testfile_implicit_pointer.c b/tests/testfile_implicit_pointer.c
new file mode 100644
index 00000000..d7e28a0e
--- /dev/null
+++ b/tests/testfile_implicit_pointer.c
@@ -0,0 +1,12 @@
+// gcc -g -O2 -o implicit_pointer implicit_pointer.c
+
+static __attribute__((noinline, noclone)) int foo (int i)
+{
+ int *p = &i;
+ return *p;
+}
+
+int main (void)
+{
+ return foo (23) - 23;
+}