fix constant bit_field field access returning zero value

This commit is contained in:
Michael Tesař committed 2026-09-15 22:28:53 +02:00
1 parent 6d23dd8367
commit a26aca2fe6
2 files changed
+26 -1

No files matched your search

+1 -1
View File
@@ -5600,7 +5600,7 @@ gb_internal ExactValue get_constant_field_single(CheckerContext *c, ExactValue v
if (success_) *success_ = false;
if (finish_) *finish_ = true;
return empty_exact_value;
} else if (is_type_struct(node->tav.type)) {
} else if (is_type_struct(node->tav.type) || is_type_bit_field(node->tav.type)) {
bool found = false;
for (Ast *elem : cl->elems) {
if (elem->kind != Ast_FieldValue) {