2 /* { dg-options "-fPIC" { target fpic } } */
3 __attribute__ ((noinline
, noclone
)) int
4 bar (int flag
, const char *__restrict format
, ...)
6 asm volatile ("" : : "r" (flag
), "r" (format
) : "memory");
10 extern inline __attribute__ ((__always_inline__
, __gnu_inline__
, __artificial__
)) int
11 baz (const char *__restrict fmt
, ...)
13 return bar (1, fmt
, __builtin_va_arg_pack ());
16 __attribute__ ((noinline
, noclone
)) int
17 f1 (void **a
, const char *b
, int *c
)
21 asm volatile ("" : : "r" (&a
), "r" (b
), "r" (&c
) : "memory");
25 __attribute__ ((noinline
, noclone
)) int
26 f2 (void *a
, int b
, int c
, long d
[], int *e
)
28 asm volatile ("" : : "r" (a
), "r" (b
), "r" (c
), "r" (d
), "r" (e
) : "memory");
32 __attribute__ ((noinline
, noclone
)) int
35 asm volatile ("" : : "r" (a
), "r" (b
) : "memory");
39 __attribute__ ((noinline
, noclone
)) int
40 f4 (void *a
, const char *b
, int c
, int d
, double *e
, int f
, char **g
, int *h
)
42 asm volatile ("" : : "r" (a
), "r" (b
), "r" (c
), "r" (d
) : "memory");
43 asm volatile ("" : : "r" (e
), "r" (f
), "r" (g
), "r" (h
) : "memory");
47 __attribute__ ((noinline
, noclone
)) int
48 f5 (void *a
, long long b
, int c
, char **d
, char **e
, char **f
, const char *g
, long long h
, int *i
)
50 asm volatile ("" : : "r" (a
), "r" (b
), "r" (c
), "r" (d
) : "memory");
51 asm volatile ("" : : "r" (e
), "r" (f
), "r" (g
), "r" (h
) : "memory");
52 asm volatile ("" : : "r" (i
) : "memory");
56 __attribute__ ((noinline
, noclone
)) int
57 f6 (void *a
, int b
, int *c
, int *d
)
59 asm volatile ("" : : "r" (a
), "r" (b
), "r" (c
), "r" (d
) : "memory");
63 __attribute__ ((noinline
, noclone
)) int
64 f7 (void *a
, int b
, long long c
, long long d
, long long e
, double *f
, int *g
)
66 asm volatile ("" : : "r" (a
), "r" (b
), "r" (c
), "r" (d
) : "memory");
67 asm volatile ("" : : "r" (e
), "r" (f
), "r" (g
) : "memory");
71 __attribute__ ((noinline
, noclone
)) int
72 f8 (void *a
, int b
, long long c
, long long d
, long long e
, char *f
, const char **g
, int *h
, int *i
)
74 asm volatile ("" : : "r" (a
), "r" (b
), "r" (c
), "r" (d
) : "memory");
75 asm volatile ("" : : "r" (e
), "r" (f
), "r" (g
), "r" (h
) : "memory");
76 asm volatile ("" : : "r" (i
) : "memory");
80 __attribute__ ((noinline
, noclone
)) int
81 f9 (void *a
, int b
, long long c
, long long d
, long long e
, char *f
, int *g
)
83 asm volatile ("" : : "r" (a
), "r" (b
), "r" (c
), "r" (d
) : "memory");
84 asm volatile ("" : : "r" (e
), "r" (f
), "r" (g
) : "memory");
88 __attribute__ ((noinline
, noclone
)) int
89 f10 (void *a
, int b
, long long c
, long long d
, long long e
, unsigned char f
, unsigned char *g
, int *h
, int *i
)
91 asm volatile ("" : : "r" (a
), "r" (b
), "r" (c
), "r" (d
) : "memory");
92 asm volatile ("" : : "r" (e
), "r" (f
), "r" (g
), "r" (h
) : "memory");
93 asm volatile ("" : : "r" (i
) : "memory");
97 __attribute__ ((noinline
, noclone
)) int
98 f11 (void *a
, int b
, long long c
, long long d
, long long e
, long f
, long *g
, int *h
, int *i
)
100 asm volatile ("" : : "r" (a
), "r" (b
), "r" (c
), "r" (d
) : "memory");
101 asm volatile ("" : : "r" (e
), "r" (f
), "r" (g
), "r" (h
) : "memory");
102 asm volatile ("" : : "r" (i
) : "memory");
106 __attribute__ ((noinline
, noclone
)) int
107 f12 (void *a
, int b
, long long c
, long long d
, long long e
, float f
, float *g
, int *h
, int *i
)
109 asm volatile ("" : : "r" (a
), "r" (b
), "r" (c
), "r" (d
) : "memory");
110 asm volatile ("" : : "r" (e
), "r" (f
), "r" (g
), "r" (h
) : "memory");
111 asm volatile ("" : : "r" (i
) : "memory");
115 __attribute__ ((noinline
, noclone
)) int
116 f13 (void *a
, int b
, long long c
, long *d
, long *e
, int *f
)
118 asm volatile ("" : : "r" (a
), "r" (b
), "r" (c
), "r" (d
) : "memory");
119 asm volatile ("" : : "r" (e
), "r" (f
) : "memory");
123 __attribute__ ((noinline
, noclone
)) int
124 f14 (void *a
, int b
, int *c
, int *d
)
126 asm volatile ("" : : "r" (a
), "r" (b
), "r" (c
), "r" (d
) : "memory");
135 int b
, c
, d
= 0, e
, f
= 0;
149 double x
[3] = { 15.1515151515151515, 16.1616161616161616, 17.1717171717171717 };
152 char *b2
[10], *c2
[10], *d2
[10];
153 char e2
[] = "abcdefghijklm";
154 for (g
= 0; g
< 21; g
++)
160 if (f2 (a2
, c
, d
, r
, &b
) > 0)
161 __builtin_strcpy (z
, "12345678901234567890123478901234567");
164 if (f4 (a2
, "abcdefg", 1, j
, x
, 14, v
, &b
) > 0)
166 for (g
= 0; g
< a
; g
++)
168 f5 (a2
, s
, f
, b2
, c2
, d2
, e2
, 0L, &b
);
169 if (f6 (a2
, -1, &e
, &b
) > 0)
173 if (f6 (a2
, 1, &e
, &b
) > 0)
175 f7 (a2
, 8, g
, 1, g
, q
, &b
);
176 for (g
= 1; g
<= 20; g
++)
178 for (h
= 0; h
< g
; h
++)
183 f8 (a2
, 1, g
, 1, 1, u
, w
, &m
, &b
);
184 for (h
= 0; h
< g
; h
++)
187 f9 (a2
, 3, g
, 1, g
, t
, &b
);
188 for (h
= 0; h
< g
; h
++)
190 f10 (a2
, 4, g
, 1, g
, 99, n
, &m
, &b
);
191 f11 (a2
, 6, g
, 1, g
, 99, o
, &m
, &b
);
192 f12 (a2
, 7, g
, 1, g
, 99., p
, &m
, &b
);
193 f13 (a2
, 8, g
, &k
, &l
, &b
);