| author | |
| committer | |
| log | 78a7bb108ad9f7bf59061675bcae8947d65afc3a |
| tree | 8ce9d6fbe2f9c4e40d9e1dbefb54646a333c15ab |
| parent | dd437ae39948031dc04836f245c8b77d459a428a |
Closes #13159
Closes #131883 files changed, 16 insertions(+), 1 deletions(-)
src/codegen/llvm.zig+1-1| ... | @@ -1916,7 +1916,7 @@ pub const Object = struct { | ... | @@ -1916,7 +1916,7 @@ pub const Object = struct { |
| 1916 | 1916 | ||
| 1917 | if (ty.castTag(.@"struct")) |payload| { | 1917 | if (ty.castTag(.@"struct")) |payload| { |
| 1918 | const struct_obj = payload.data; | 1918 | const struct_obj = payload.data; |
| 1919 | if (struct_obj.layout == .Packed) { | 1919 | if (struct_obj.layout == .Packed and struct_obj.haveFieldTypes()) { |
| 1920 | const info = struct_obj.backing_int_ty.intInfo(target); | 1920 | const info = struct_obj.backing_int_ty.intInfo(target); |
| 1921 | const dwarf_encoding: c_uint = switch (info.signedness) { | 1921 | const dwarf_encoding: c_uint = switch (info.signedness) { |
| 1922 | .signed => DW.ATE.signed, | 1922 | .signed => DW.ATE.signed, |
test/behavior.zig+1| ... | @@ -109,6 +109,7 @@ test { | ... | @@ -109,6 +109,7 @@ test { |
| 109 | _ = @import("behavior/bugs/13128.zig"); | 109 | _ = @import("behavior/bugs/13128.zig"); |
| 110 | _ = @import("behavior/bugs/13164.zig"); | 110 | _ = @import("behavior/bugs/13164.zig"); |
| 111 | _ = @import("behavior/bugs/13171.zig"); | 111 | _ = @import("behavior/bugs/13171.zig"); |
| 112 | _ = @import("behavior/bugs/13159.zig"); | ||
| 112 | _ = @import("behavior/byteswap.zig"); | 113 | _ = @import("behavior/byteswap.zig"); |
| 113 | _ = @import("behavior/byval_arg_var.zig"); | 114 | _ = @import("behavior/byval_arg_var.zig"); |
| 114 | _ = @import("behavior/call.zig"); | 115 | _ = @import("behavior/call.zig"); |
test/behavior/bugs/13159.zig created+14| ... | @@ -0,0 +1,14 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const expect = std.testing.expect; | ||
| 3 | |||
| 4 | const Bar = packed struct { | ||
| 5 | const Baz = enum { | ||
| 6 | fizz, | ||
| 7 | buzz, | ||
| 8 | }; | ||
| 9 | }; | ||
| 10 | |||
| 11 | test { | ||
| 12 | var foo = Bar.Baz.fizz; | ||
| 13 | try expect(foo == .fizz); | ||
| 14 | } | ||