Allow initialization of local vars with const-qualified struct or union type.

Here's an example that shows the problem (derived from a csmith-generated test case):

void f(void)
{
    const struct S {int i;} s = {1};
}
This commit is contained in:
Stephen Heumann 2018-03-25 18:12:49 -05:00
parent 9b08d4337a
commit 4746d9ff60
1 changed files with 2 additions and 0 deletions

View File

@ -3846,6 +3846,8 @@ var
begin {Initialize}
while itype^.kind = definedType do
itype := itype^.dType;
case itype^.kind of
scalarType,pointerType,enumType,functionType: begin