2016-11-21 Thomas Preud'homme <thomas.preudhomme@arm.com>
[official-gcc.git] / gcc / testsuite / gcc.target / arm / sibcall-1.c
blobcf352c12c6f6d380b4858af895b8d1c5edc2e0f8
1 /* { dg-do compile { target { arm32 } } } */
2 /* { dg-options "-O2" } */
4 #define noinline __attribute__((noinline))
6 typedef struct {
7 int data[4];
8 } arr16_t;
10 int result = 0;
12 void noinline func2 (int i, int j, arr16_t arr)
14 result = (arr.data[0] != 1
15 || arr.data[1] != 2
16 || arr.data[2] != 3
17 || arr.data[3] != 4);
20 void func1 (int i, int j, int k, int l, int m, int n, arr16_t a)
22 func2(i, j, a);
25 int main(int argc, const char *argv[])
27 arr16_t arr = {{1, 2, 3, 4}};
29 func1(0, 0, 0, 0, 0, 0, arr);
30 return result;
33 /* The PLT marker may appear if the test is run with -fpic/-fPIC. */
34 /* { dg-final { scan-assembler "\tb\tfunc2(\\(PLT\\))?\n" } } */