view test/union2.d @ 266:5d2f4814bb2e trunk

[svn r287] update to test statistics generation
author ChristianK
date Sun, 15 Jun 2008 12:58:48 +0200
parents 61615fa85940
children
line wrap: on
line source

module union2;

pragma(LLVM_internal, "notypeinfo")
union U
{
    float f;
    long l;
}

U u;

void main()
{
    assert(u.f !<>= 0);
    {
        uint* p = 1 + cast(uint*)&u;
        {assert(*p == 0);}
    }
}