From ac3af37d27c49704dd3b2d303b4497b08f8b47fd Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 31 Mar 2010 15:44:38 -1000 Subject: [PATCH] Allow initializers of constant values to succeed. This regresses constFunc.frag, but that's just unexpectedly passing because of the FINISHME just above. --- ast_to_hir.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp index 137abdaaa6c..11000a81346 100644 --- a/ast_to_hir.cpp +++ b/ast_to_hir.cpp @@ -1441,8 +1441,12 @@ ast_declarator_list::hir(exec_list *instructions, */ if (!rhs->type->is_error()) { + bool temp = var->read_only; + if (this->type->qualifier.constant) + var->read_only = false; (void) do_assignment(instructions, state, lhs, rhs, this->get_location()); + var->read_only = temp; } } -- 2.30.2