view test/union2.d @ 179:c853a8a04cdc trunk

[svn r195] fixed some tango bugs (tango ticket 1093).
author lindquist
date Wed, 07 May 2008 05:45:25 +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);}
    }
}