Fix initialization

In the following
typedef struct S0 { char ac[4]; } T1;
int v26 = (int)&((T1*)0)->ac[3];
int v27 = &((T1*)0)->ac[3];
v27 should be initialized to 3 just as v26.
This commit is contained in:
Alexey Frunze
2014-04-21 01:08:49 -07:00
parent a0a4e242e6
commit fd04710c23

View File

@@ -5805,7 +5805,7 @@ int InitScalar(int synPtr, int tok)
{
// TBD??? truncate values for types smaller than int (e.g. char and short),
// so they are always in range?
GenIntData(elementSz, exprVal);
GenIntData(elementSz, stack[0][1]);
}
else if (elementSz == SizeOfWord + 0u && stack[sp - 1][0] == tokIdent)
{