Bug 13357 – [ICE] Segfault on comparison of rvalue __vector and array

Status
RESOLVED
Resolution
WORKSFORME
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-08-22T14:16:07Z
Last change time
2020-03-21T03:56:33Z
Keywords
SIMD
Assigned to
No Owner
Creator
Alexey Prokhin

Comments

Comment #0 by alexey.prokhin — 2014-08-22T14:16:07Z
alias __vector(float[4]) float4; void main() { float4 a = 1, b = 2; // 2.065: segfault // 2.066: Error: cannot compare float[4] and int[] assert((a + b).array == [3, 3, 3, 3]); // segfault on both 2.065 and 2.066 assert((a + b).array == [3.0f, 3.0f, 3.0f, 3.0f]); } The code works with ldc, however I had to revert changes to TypeVector::dotExp() from https://github.com/D-Programming-Language/dmd/pull/3467
Comment #1 by john.loughran.colvin — 2014-12-18T22:16:01Z
Just an update to say that this still affects git HEAD, with exactly the same errors as 2.066 Bugs like this make SIMD in D a complete pain. C with gcc or icc is better to use.
Comment #2 by bugzilla — 2016-11-22T01:28:38Z
At least it doesn't seg fault anymore.