Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for alignment of Int128/UInt128 #55565

Merged
merged 3 commits into from
Aug 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions test/compiler/codegen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -984,3 +984,18 @@ 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
local broken_i128 = Base.BinaryPlatforms.arch(Base.BinaryPlatforms.HostPlatform()) == "powerpc64le"
@test fieldoffset($(StructName), 2) == 16
@test fieldoffset($(StructName), 3) == 32 broken=broken_i128
@test sizeof($(StructName)) == 48 broken=broken_i128
end
end