OSDN Git Service

* gcc.target/arm/thumb-andsi.c: Correct dg-options and add
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / arm / sibcall-1.c
1 /* { dg-do compile { target { arm32 } } } */
2 /* { dg-options "-O2" } */
3
4 #define noinline __attribute__((noinline))
5
6 typedef struct {
7   int data[4];
8 } arr16_t;
9
10 int result = 0;
11
12 void noinline func2 (int i, int j, arr16_t arr)
13 {
14   result = (arr.data[0] != 1
15             || arr.data[1] != 2
16             || arr.data[2] != 3
17             || arr.data[3] != 4);
18 }
19
20 void func1 (int i, int j, int k, int l, int m, int n, arr16_t a)
21 {
22   func2(i, j, a);
23 }
24
25 int main(int argc, const char *argv[])
26 {
27   arr16_t arr = {{1, 2, 3, 4}};
28     
29   func1(0, 0, 0, 0, 0, 0, arr);
30   return result;
31 }
32
33 /* The PLT marker may appear if the test is run with -fpic/-fPIC.  */
34 /* { dg-final { scan-assembler "\tb\tfunc2(\\(PLT\\))?\n" } } */
35