Odin
Odin copied to clipboard
LLVM code gen failed on intrinsics.atomic_load with nested struct
Odin report:
Odin: dev-2021-11-nightly:bb7703fc
OS: Windows 10 Professional (version: 20H2), build 19042.1348
CPU: AMD Ryzen 5 1600 Six-Core Processor
RAM: 16314 MiB
Error example:
package main;
import "core:intrinsics"
SubStruct :: struct{
field1 : int,
}
MainStruct :: struct{
field1 : SubStruct,
}
error_test :: proc ( self: ^MainStruct ) {
intrinsics.atomic_load( &self.field1 );
}
main :: proc () {
object := MainStruct{};
error_test(&object);
}
Output:
LLVM CODE GEN FAILED FOR PROCEDURE: main.error_test
define internal void @main.error_test(%main.MainStruct* %0, i8* noalias nocapture nonnull %__.context_ptr) {
decls:
%1 = alloca %main.MainStruct*, align 8
br label %entry
entry: ; preds = %decls
store %main.MainStruct* %0, %main.MainStruct** %1, align 8
%2 = bitcast i8* %__.context_ptr to %runtime.Context*
%3 = load %main.MainStruct*, %main.MainStruct** %1, align 8
%4 = getelementptr inbounds %main.MainStruct, %main.MainStruct* %3, i32 0, i32 0
%5 = load atomic %main.SubStruct, %main.SubStruct* %4 seq_cst, align 8
ret void
}
Hello!
I am marking this issue as stale as it has not received any engagement from the community or maintainers 120 days. That does not imply that the issue has no merit! If you feel strongly about this issue
- open a PR referencing and resolving the issue;
- leave a comment on it and discuss ideas how you could contribute towards resolving it;
- leave a comment and describe in detail why this issue is critical for your use case;
- open a new issue with updated details and a plan on resolving the issue.
The motivation for this automation is to help prioritize issues in the backlog and not ignore, reject, or belittle anyone..