summaryrefslogtreecommitdiffstats
path: root/src/tests/testfile_parameter_ref.c
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-02-25 17:00:18 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-02-25 17:00:18 +0000
commita963009a0b9d502ffe81e79c7c3b45b3cf58b044 (patch)
treea63e40b5dd9927bd04ec7427c8797975c2a71f85 /src/tests/testfile_parameter_ref.c
parent46a0b252322932680dbaa86a42944fb822af924d (diff)
parent412f6b917fc658c24dd7d624bb82bf1a1e791b95 (diff)
downloadandroid_external_elfutils-a963009a0b9d502ffe81e79c7c3b45b3cf58b044.tar.gz
android_external_elfutils-a963009a0b9d502ffe81e79c7c3b45b3cf58b044.tar.bz2
android_external_elfutils-a963009a0b9d502ffe81e79c7c3b45b3cf58b044.zip
am 412f6b91: am 7401a30e: am 36e62782: Merge "Upgrade to elfutils 0.161."
* commit '412f6b917fc658c24dd7d624bb82bf1a1e791b95': Upgrade to elfutils 0.161.
Diffstat (limited to 'src/tests/testfile_parameter_ref.c')
-rw-r--r--src/tests/testfile_parameter_ref.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/tests/testfile_parameter_ref.c b/src/tests/testfile_parameter_ref.c
new file mode 100644
index 00000000..7fe985f3
--- /dev/null
+++ b/src/tests/testfile_parameter_ref.c
@@ -0,0 +1,20 @@
+// gcc -g -O2 -o parameter_ref parameter_ref.c
+
+volatile int vv;
+
+/* Don't inline, but do allow clone to create specialized versions. */
+static __attribute__((noinline)) int
+foo (int x, int y, int z)
+{
+ int a = x * 2;
+ int b = y * 2;
+ int c = z * 2;
+ vv++;
+ return x + z;
+}
+
+int
+main (int x, char **argv)
+{
+ return foo (x, 2, 3) + foo (x, 4, 3) + foo (x + 6, x, 3) + x;
+}