http://d.puremagic.com/issues/show_bug.cgi?id=7414

           Summary: Vector literal assignment doesn't work in global scope
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: turkey...@gmail.com


--- Comment #0 from Manu <turkey...@gmail.com> 2012-01-31 11:12:22 PST ---
This causes the same error with or without 'immutable', but works fine within
functions.

// create some global constants
private
{
    immutable ulong2 signMask2 = 0x8000_0000_0000_0000;
    immutable uint4 signMask4 = 0x8000_0000;
    immutable ushort8 signMask8 = 0x8000;
    immutable ubyte16 signMask16 = 0x80;
}



$ /opt/gdc/bin/gdc test.d -O2 -S -msse2
test.d:101: Error: non-constant expression
cast(immutable(__vector(ulong[2u])))9223372036854775808LU
test.d:102: Error: non-constant expression
cast(immutable(__vector(uint[4u])))-2147483648u
test.d:103: Error: non-constant expression
cast(immutable(__vector(ushort[8u])))32768
test.d:104: Error: non-constant expression
cast(immutable(__vector(ubyte[16u])))128

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to