On 3 October 2012 16:40, Iain Buclaw <span dir="ltr"><<a href="mailto:ibuclaw@ubuntu.com" target="_blank">ibuclaw@ubuntu.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 3 October 2012 02:31, jerro <<a href="mailto:a@a.com">a@a.com</a>> wrote:<br>
>> import core.simd, std.stdio;<br>
>><br>
>> void main()<br>
>> {<br>
>>   float4 a = 1, b = 2;<br>
>>   writeln((a + b).array); // WORKS: [3, 3, 3, 3]<br>
>><br>
>>   float4 c = [1, 2, 3, 4]; // ERROR: "Stored value type does<br>
>>                            // not match pointer operand type!"<br>
>>                            // [..a bunch of LLVM error code..]<br>
>><br>
>>   float4 c = 0, d = 1;<br>
>>   c.array[0] = 4;<br>
>>   c.ptr[1] = 4;<br>
>>   writeln((c + d).array); // WRONG: [1, 1, 1, 1]<br>
>> }<br>
><br>
><br>
> Oh, that doesn't work for me either. I never tried to use those, so I didn't<br>
> notice that before. This code gives me internal compiler errors with GDC and<br>
> DMD too (with "float4 c = [1, 2, 3, 4]" commented out). I'm using DMD 2.060<br>
> and a recent versions of GDC and LDC on 64 bit Linux.<br>
<br>
</div></div>Then don't just talk about it, raise a bug - otherwise how do you<br>
expect it to get fixed!  ( <a href="http://www.gdcproject.org/bugzilla" target="_blank">http://www.gdcproject.org/bugzilla</a> )<br>
<br>
I've made a note of the error you get with `__vector(float[4]) c =<br>
[1,2,3,4];' - That is because vector expressions implementation is<br>
very basic at the moment.  Look forward to hear from all your<br>
experiences so we can make vector support rock solid in GDC. ;-)<br></blockquote><div><br></div><div>I didn't realise vector literals like that were supported properly in the front end yet?</div><div>Do they work at all? What does the code generated look like?</div>
</div>