]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/lto/20120723_0.c
Get rid of dg-skip-if etc. default args
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / lto / 20120723_0.c
CommitLineData
8b7773a4 1/* Make sure that by reference and by value aggregate jump functions do not get
db7f5754
EB
2 mixed up.
3 ??? This testcase is invalid C and can only pass on specific platforms. */
8b7773a4 4/* { dg-lto-do run } */
4f4b0ab8 5/* { dg-skip-if "" { { sparc*-*-* } && ilp32 } } */
259d29e3 6/* { dg-lto-options { {-O3 -fno-early-inlining -flto -Wno-lto-type-mismatch}} } */
8b7773a4
MJ
7
8extern void abort (void);
9
10struct S
11{
12 int i;
13 void (*f)(struct S *);
14 int j;
15};
16
17struct E
18{
19 struct S *p;
20};
21
22struct S *gs;
23int gr = 111;
24char gc[1024];
25
26static __attribute__ ((noinline, noclone)) struct S *
27get_s (void)
28{
29 return (struct S *) &gc;
30}
31
32static void wrong_target (struct S *s)
33{
34 abort ();
35}
36
37void bar (struct S *s)
38{
39 s->f (s);
40}
41
42extern void foo (struct S *s);
43
44int main (int argc, char **argv)
45{
46 struct S *s = get_s();
47 gs = s;
48 s->i = 5678;
49 s->f = wrong_target;
50 s->j = 1234;
51 foo (s);
52
53 return gr;
54}