]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/extern-so/test.c
Rollup merge of #101431 - compiler-errors:move-place-ty-for-move-place-sugg, r=cjgillot
[rust.git] / src / tools / miri / tests / extern-so / test.c
1 #include <stdio.h>
2
3 int add_one_int(int x) {
4   return 2 + x;
5 }
6
7 void printer() {
8   printf("printing from C\n");
9 }
10
11 // function with many arguments, to test functionality when some args are stored
12 // on the stack
13 int test_stack_spill(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, int k, int l) {
14   return a+b+c+d+e+f+g+h+i+j+k+l;
15 }
16
17 unsigned int get_unsigned_int() {
18   return -10;
19 }
20
21 short add_int16(short x) {
22   return x + 3;
23 }
24
25 long add_short_to_long(short x, long y) {
26   return x + y;
27 }