D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 11655 - assignment of struct with vector field
Summary: assignment of struct with vector field
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: ice
Depends on:
Blocks:
 
Reported: 2013-11-30 11:20 UTC by Martin Nowak
Modified: 2020-03-21 03:56 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Martin Nowak 2013-11-30 11:20:29 UTC
cat > bug.d << CODE
struct Foo
{
    __vector(float[4]) x;
}

void bug()
{
    Foo y;
    y = Foo([0, 0, 0, 0]); // OK
    y = Foo();             // NG
}
CODE
dmd -c bug

----
tym = x1d
Internal error: backend/cgxmm.c 547
----

The function xmmload is called with TYnptr.
Comment 1 John Colvin 2014-12-19 09:59:15 UTC
Both of these now compile, but they segfault at runtime. I'm pretty sure it's because of an unaligned access when reading the initialiser.