diff options
author | Chih-hung Hsieh <chh@google.com> | 2015-09-25 14:51:48 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-09-25 14:51:48 +0000 |
commit | b0121c5547604527aaeea297b54047cd14b234df (patch) | |
tree | 7d9031ee3d5796de4a1825892fc6e04ba6e36ae2 /tests/testfile_parameter_ref.c | |
parent | d03895cf5f8b77c6a85abcd84ea0d80ff56be846 (diff) | |
parent | 5eafdf0f9bfd9a3c5f93414ac16bb399b6da0b7f (diff) | |
download | android_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_parameter_ref.c')
-rw-r--r-- | tests/testfile_parameter_ref.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/testfile_parameter_ref.c b/tests/testfile_parameter_ref.c new file mode 100644 index 00000000..7fe985f3 --- /dev/null +++ b/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; +} |