www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23047] New: [ICE][SIMD] SIMD + void initialization + -O leads

https://issues.dlang.org/show_bug.cgi?id=23047

          Issue ID: 23047
           Summary: [ICE][SIMD] SIMD + void initialization + -O leads to
                    DMD crash
           Product: D
           Version: D2
          Hardware: x86_64
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: aliloko gmail.com

With dmd 2.100-beta.1,
consider the following program:


-------- main.d -----------

import core.simd;

long2 _mm_srl_epi64 ()
{    
    long2 r = void;
    r[0] = 1;
    return r;
}

void main(string[] args)
{
}

---------------------------

For an ICE, build with:
  $ dmd -m64 -O main.d

DMD crash silently with error code -1073741795.


Removing the = void, or -O, workaround the bug.


Older DMD like 2.095.1 displays the error instead:
   main.d(7): Error: variable __r_8 used before set

--
Apr 22 2022