/+
REQUIRED_ARGS: -o- -HC

TEST_OUTPUT:
---
// Automatically generated by Digital Mars D Compiler

#pragma once

#include <assert.h>
#include <math.h>
#include <stddef.h>
#include <stdint.h>

union U1
{
    int32_t a;
    double d;
};

union U2
{
    double d;
    char* ptr;
};

struct S final
{
    int32_t i;
    U1 u1;
    U2 u2;
    S() :
        i(),
        u1(),
        u2()
    {
    }
    S(int32_t i, U1 u1 = U1(0), U2 u2 = U2(NAN)) :
        i(i),
        u1(u1),
        u2(u2)
        {}
};
---
+/

extern (C++):

union U1
{
	int a;
	double d;
}

union U2
{
	double d;
	char* ptr;
}

struct S
{
	int i;
	U1 u1;
	U2 u2;
}
