summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/union-1.c
blob: 0dd2df9b064e0b3a195488e0b969d0aff43c32eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* PR target/15783 */
/* Origin: Paul Pluzhnikov <ppluzhnikov@charter.net> */

/* This used to ICE on SPARC 64-bit because the back-end was
   returning an invalid construct for the return value of fu2.  */

/* { dg-do compile } */

union u2 {
    struct
    {
        int u2s_a, u2s_b, u2s_c, u2s_d, u2s_e;
    } u2_s;
    double u2_d;
} u2a;

union u2 fu2();

void unions()
{
    u2a = fu2();
}