Skip to content

Commit

Permalink
Add tests for alignment of Int128/UInt128
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano committed Aug 22, 2024
1 parent 58c7186 commit bb8296e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/compiler/codegen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -984,3 +984,17 @@ end
@test g55208((Union{}, true, true), 0) === typeof(Union{})

@test string((Core.Union{}, true, true, true)) == "(Union{}, true, true, true)"

# Issue #55558
for (T, StructName) in ((Int128, :Issue55558), (UInt128, :UIssue55558))
@eval begin
struct $(StructName)
a::$(T)
b::Int64
c::$(T)
end
@test fieldoffset($(StructName), 2) == 16
@test fieldoffset($(StructName), 3) == 32
@test sizeof($(StructName)) == 48
end
end

0 comments on commit bb8296e

Please sign in to comment.