- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
arch-x86_6464-bit x8664-bit x86backend-self-hostedenhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.
Milestone
Description
Zig Version
0.14.0-dev.3224+5ab511307
Steps to Reproduce and Observed Behavior
const std = @import("std");
test {
var s = S.init();
_ = &s;
}
const S = packed struct {
a: u48,
b: u80,
pub fn init() S {
var a: u48 = 0;
var b: u80 = 0;
_ = .{ &a, &b };
return S{
.a = a,
.b = b,
};
}
};
$ zig-master test ./test.zig -fno-llvm -fno-lld
test.zig:12:9: error: TODO airAggregateInit implement packed structs with large fields
pub fn init() S {
~~~~^~~~~~~~~~~
Expected Behavior
all tests passed
Metadata
Metadata
Assignees
Labels
arch-x86_6464-bit x8664-bit x86backend-self-hostedenhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.
Type
Projects
Relationships
Development
Select code repository
Activity
[-]x86_64: TODO airAggregateInit implement packed structs with large fields[/-][+]x86_64: packed semantics are not robust[/+]jacobly0 commentedon Jun 1, 2025
Instruction selection of
bitcast
,load
,store
,store_safe
,struct_field_val
, andaggregate_init
on packed pointers/fields need to be rewritten in the self-hosted x86_64 backend.Legalize: handle packed semantics
Legalize: handle packed semantics
Legalize: handle packed semantics