D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7508 - float4 values aren't stored on initialisation
Summary: float4 values aren't stored on initialisation
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: All All
: P2 major
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-15 08:11 UTC by Ben Grabham
Modified: 2013-12-09 02:01 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Ben Grabham 2012-02-15 08:11:46 UTC
When running the code below, the float 2 should be stored yet it isn't. On Linux, the output is 4 lines of -nan, on Mac, the output is 4 lines of 0.0:

import core.simd;
import std.conv;
import std.stdio;

void main() {
  float4 fl = 2;
  foreach(f; fl.array)
    writefln("%f", f);
}
Comment 1 SomeDude 2012-04-20 00:32:21 UTC
2.059 Win32

PS E:\DigitalMars\dmd2\samples> dmd bug.d
Internal error: ..\ztc\cg87.c 1699

See also http://d.puremagic.com/issues/show_bug.cgi?id=7507
Comment 2 Sean Cavanaugh 2012-04-20 01:11:39 UTC
See also:

http://d.puremagic.com/issues/show_bug.cgi?id=7413

This is preventing a lot of work from being able to be done on the simd libraries.  Algorithms like sin, cos, require a lot of literal constants to function, let alone several hundreds of constants  for a comprehensive set of unit tests.
Comment 3 Iain Buclaw 2013-12-09 02:01:47 UTC
This has been fixed for a while now / can not reproduce.