mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
Fix flaw in bitstruct check.
This commit is contained in:
@@ -2017,10 +2017,9 @@ static void llvm_emit_initialize_designated_element(GenContext *c, BEValue *ref,
|
|||||||
{
|
{
|
||||||
llvm_value_struct_gep(c, &value, ref, (unsigned) curr->index);
|
llvm_value_struct_gep(c, &value, ref, (unsigned) curr->index);
|
||||||
}
|
}
|
||||||
if (type->type_kind == TYPE_BITSTRUCT)
|
if (type->type_kind == TYPE_BITSTRUCT && last == current + 1)
|
||||||
{
|
{
|
||||||
assert(llvm_value_is_addr(&value));
|
assert(llvm_value_is_addr(&value));
|
||||||
assert(last == current + 1);
|
|
||||||
Decl *member = type->decl->bitstruct.members[last[0]->index];
|
Decl *member = type->decl->bitstruct.members[last[0]->index];
|
||||||
// Special handling of bitstructs.
|
// Special handling of bitstructs.
|
||||||
Type *underlying_type = value.type;
|
Type *underlying_type = value.type;
|
||||||
|
|||||||
Reference in New Issue
Block a user