Bug 15728 – ICE while simd vec.f.array compared to ordinal array

Status
RESOLVED
Resolution
WORKSFORME
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2016-02-26T22:49:12Z
Last change time
2020-03-21T03:56:33Z
Keywords
SIMD
Assigned to
No Owner
Creator
Iakh

Comments

Comment #0 by iaktakh — 2016-02-26T22:49:12Z
Here is two cases: 1) pass vector by ref, return, compare, ...ICE 2) apply op, compare, fail with exit code -11 import core.simd; int4 f() { int4 vec; return vec; } void main() { int4 vec; assert(f.array == [-1, -1, -1, -1]); /* catch-bug ~master: building configuration "application"... Internal error: backend/cod1.c 1669 dmd failed with exit code 1. */ //assert((-vec).array == [-1, -1, -1, -1]); /* catch-bug ~master: building configuration "application"... dmd failed with exit code -11. */ } In second case could be used unary or binary operator (v1 & v2), (-vec), ... DMD64 D Compiler v2.070
Comment #1 by b2.temp — 2019-11-03T18:39:09Z
crashes are gone however there's another bug I'll open. Unary operators modify while they should return a modified copy.
Comment #2 by b2.temp — 2019-11-03T18:42:51Z
No actually everything is fine import core.simd; int4 f() { int4 vec = [-1, -1, -1, -1]; return vec; } void main() { assert(f().array == [-1, -1, -1, -1]); int4 v2 = f(); assert(v2.array == [-1, -1, -1, -1]); int4 vec = [1, 1, 1, 1]; assert((-vec).array == [-1, -1, -1, -1]); int4 neg = -vec; assert(neg.array == [-1, -1, -1, -1]); neg = -neg; assert(neg.array == [1, 1, 1, 1]); }