D-Programming-Language/dmd — pull request #2915 by ibuclaw (2013-12-02 12:32:23+00:00)
Title: Add TypeVector::toDt to generate correct default initialiser for vectors

Given the code:
```
import core.simd;
ubyte16 x;
float4 y;
// __vector(T[U]) any;
```
The logic through VarDeclaration::toObjFile goes:
```
if (init)
{
/* init == NULL in the above so this is not hit. */
}
else
type->toDt(&s->Sdt);
```
Which only sets the initialiser for the decl as the elem initialiser, ergo:
```
ubyte16 x = ubyte.init;
float4 y = float.init;
```

This harms gdc which expects the decl and initialiser size to match up (at least ARM will have problems because of -fsection-anchors).

This change makes it so type->toDt generates the correct constructor.
```
ubyte16 x = [ubyte.init, repeated 16 times...];
float4 y = [float.init, repeated 4 times...];
```