diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2022-10-01 03:51:36 -0400 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2022-10-01 04:02:00 -0400 |
| commit | d9490a4340366818f91fac428981fe662d552ca6 (patch) | |
| tree | 930bb6fee4ccf3a74cc4eb61cfb179562313b080 /src/Module.zig | |
| parent | 34835bbbcfe81cc87e823d14dc9b25e698ad5edc (diff) | |
| download | zig-d9490a4340366818f91fac428981fe662d552ca6.tar.gz zig-d9490a4340366818f91fac428981fe662d552ca6.zip | |
Sema: avoid undefined fields in file struct decls
Fixes original comment of #12399
Diffstat (limited to 'src/Module.zig')
| -rw-r--r-- | src/Module.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Module.zig b/src/Module.zig index 6056c385e3..37e693c275 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -4430,6 +4430,8 @@ pub fn semaFile(mod: *Module, file: *File) SemaError!void { new_decl.has_linksection_or_addrspace = false; new_decl.ty = ty_ty; new_decl.val = struct_val; + new_decl.@"align" = 0; + new_decl.@"linksection" = null; new_decl.has_tv = true; new_decl.owns_tv = true; new_decl.alive = true; // This Decl corresponds to a File and is therefore always alive. |
