diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y index b4c9b258f07..03aa4ebba7f 100644 --- a/dlls/d3dcompiler_43/hlsl.y +++ b/dlls/d3dcompiler_43/hlsl.y @@ -251,6 +251,7 @@ static unsigned int components_count_expr_list(struct list *list) %type boolean %type base_type %type type +%type declaration_statement %type complex_initializer %type initializer_expr_list %type initializer_expr @@ -530,6 +531,8 @@ base_type: KW_VOID declaration_statement: declaration { + $$ = d3dcompiler_alloc(sizeof(*$$)); + list_init($$); } declaration: var_modifiers type variables_def ';' @@ -713,8 +716,7 @@ statement_list: statement statement: declaration_statement { - $$ = d3dcompiler_alloc(sizeof(*$$)); - list_init($$); + $$ = $1; } | expr_statement {