mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
stage1: Fix wrong union access
Thanks to @frett27 on irc for reporting the compiler would segfault when run on ARM.
This commit is contained in:
parent
328eb8ed8d
commit
5eaf948e62
@ -1887,7 +1887,7 @@ static bool iter_function_params_c_abi(CodeGen *g, ZigType *fn_type, FnWalk *fn_
|
||||
if (type_is_nonnull_ptr(g, ty)) {
|
||||
addLLVMArgAttr(llvm_fn, fn_walk->data.attrs.gen_i, "nonnull");
|
||||
}
|
||||
if (ptr_type->data.pointer.is_const) {
|
||||
if (ptr_type->id == ZigTypeIdPointer && ptr_type->data.pointer.is_const) {
|
||||
addLLVMArgAttr(llvm_fn, fn_walk->data.attrs.gen_i, "readonly");
|
||||
}
|
||||
if (param_info->is_noalias) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user