rs6000.c (rs6000_function_arg): Remove CALL_LIBCALL when returning call_cookie.
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / pr39457.c
blobc4828bbb031d6c5c6375cf6691e22d2ba94c26fb
1 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
2 /* { dg-options "-O2 -mminimal-toc" } */
4 /* PR 39457 -- fix breakage because the compiler ran out of registers and
5 wanted to stash a floating point value to the LR/CTR register. */
7 /* -O2 -m64 -mminimal-toc */
8 typedef struct { void *s; } S;
9 typedef void (*T1) (void);
10 typedef void (*T2) (void *, void *, int, void *);
11 char *fn1 (const char *, ...);
12 void *fn2 (void);
13 int fn3 (char *, int);
14 int fn4 (const void *);
15 int fn5 (const void *);
16 long fn6 (void) __attribute__ ((__const__));
17 int fn7 (void *, void *, void *);
18 void *fn8 (void *, long);
19 void *fn9 (void *, long, const char *, ...);
20 void *fn10 (void *);
21 long fn11 (void) __attribute__ ((__const__));
22 long fn12 (void *, const char *, T1, T2, void *);
23 void *fn13 (void *);
24 long fn14 (void) __attribute__ ((__const__));
25 extern void *v1;
26 extern char *v2;
27 extern int v3;
29 void
30 foo (void *x, char *z)
32 void *i1, *i2;
33 int y;
34 if (v1)
35 return;
36 v1 = fn9 (fn10 (fn2 ()), fn6 (), "x", 0., "y", 0., 0);
37 y = 520 - (520 - fn4 (x)) / 2;
38 fn9 (fn8 (v1, fn6 ()), fn6 (), "wig", fn8 (v1, fn14 ()), "x", 18.0,
39 "y", 16.0, "wid", 80.0, "hi", 500.0, 0);
40 fn9 (fn10 (v1), fn6 (), "x1", 0., "y1", 0., "x2", 80.0, "y2",
41 500.0, "f", fn3 ("fff", 0x0D0DFA00), 0);
42 fn13 (((S *) fn8 (v1, fn6 ()))->s);
43 fn12 (fn8 (v1, fn11 ()), "ev", (T1) fn7, 0, fn8 (v1, fn6 ()));
44 fn9 (fn8 (v1, fn6 ()), fn6 (), "wig",
45 fn8 (v1, fn14 ()), "x", 111.0, "y", 14.0, "wid", 774.0, "hi",
46 500.0, 0);
47 v1 = fn9 (fn10 (v1), fn6 (), "x1", 0., "y1", 0., "x2", 774.0, "y2",
48 500.0, "f", fn3 ("gc", 0x0D0DFA00), 0);
49 fn1 (z, 0);
50 i1 = fn9 (fn8 (v1, fn6 ()), fn6 (), "pixbuf", x, "x",
51 800 - fn5 (x) / 2, "y", y - fn4 (x), 0);
52 fn12 (fn8 (i1, fn11 ()), "ev", (T1) fn7, 0, "/ok/");
53 fn12 (fn8 (i1, fn11 ()), "ev", (T1) fn7, 0, 0);
54 i2 = fn9 (fn8 (v1, fn6 ()), fn6 (), "txt", "OK", "fnt", v2, "x",
55 800, "y", y - fn4 (x) + 15, "ar", 0, "f", v3, 0);