compiler assert failure with ctfe on simd vector type

Manu turkeyman at gmail.com
Sat Jun 8 23:34:23 PDT 2013


On 9 June 2013 10:36, Roderick Gibson <kniteli at gmail.com> wrote:

> I get a compiler assert failing when trying to compile the follow minimal
> case:
>
> import core.simd;
>
> void main() {
>         auto arr = si;
> }
>
> const float4 si = [1f, 1f, 1f, 1f];
>
> This compiles fine:
>
> import core.simd;
>
> void main() {
>         auto arr = si;
> }
>
> float4 si = [1f, 1f, 1f, 1f];
>
> Should I file this or am I doing something dumb here?
>

Possibly unrelated to this, it looks like a bug... but certainly when it
comes to any SIMD operation. It's not really possible to solve unless the
compiler becomes aware of all architectures intrinsics.
One of my goals for std.simd is a CTFE path for all functions in the API.

This example should surely work though.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130609/c65134cf/attachment.html>


More information about the Digitalmars-d mailing list