OSDN Git Service

f2a1fdf98170d61568be764f00d86ed0c483ac92
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / i386 / pr39082-1.c
1 /* PR target/39082 */
2 /* { dg-do compile { target { ! { ia32 } } } } */
3 /* { dg-options "-O2" } */
4
5 union un
6 {
7   long double x;
8   int i;
9 };
10
11 extern int bar1 (union un);
12 extern union un bar2 (int);
13
14 int
15 foo1 (union un u)
16 {
17   bar1 (u);
18   return u.i;
19 }
20
21 int
22 foo2 (void)
23 {
24   union un u;
25   u.i = 1;
26   return foo1 (u) + bar1 (u);
27 }
28
29 int
30 foo3 (int x)
31 {
32   union un u = bar2 (x); /* { dg-message "note: the ABI of passing union with long double has changed in GCC 4.4" } */
33   return u.i;
34 }