Array-sizing bug fix: multiple array initializers of different size in the same declaration.
Handles the case of
float[] x = float[] (1.0, 2.0, 3.0),
y = float[] (1.0, 2.0, 3.0, 4.0);
where a shallow copy of the type arrayness from the left-most float[]
was getting used twice.
This commit is contained in:
@@ -174,3 +174,14 @@ layout(std430) uniform B430 { int a; } B430i; // ERROR
|
||||
struct SNA {
|
||||
int a[]; // ERROR
|
||||
};
|
||||
|
||||
void fooDeeparray()
|
||||
{
|
||||
float[] x = float[] (1.0, 2.0, 3.0),
|
||||
y = float[] (1.0, 2.0, 3.0, 4.0);
|
||||
float xp[3], yp[4];
|
||||
xp = x;
|
||||
yp = y;
|
||||
xp = y; // ERROR, wrong size
|
||||
yp = x; // ERROR, wrong size
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user