From 4746d9ff6001e5a5d9bbc8532410ba2361c6a784 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Sun, 25 Mar 2018 18:12:49 -0500 Subject: [PATCH] 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}; } --- Parser.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Parser.pas b/Parser.pas index 2fea0fe..06d8321 100644 --- a/Parser.pas +++ b/Parser.pas @@ -3846,6 +3846,8 @@ var begin {Initialize} + while itype^.kind = definedType do + itype := itype^.dType; case itype^.kind of scalarType,pointerType,enumType,functionType: begin