From 9f8927f599bfdca7c4416246e9e0cdf291a2f267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Fri, 16 May 2025 20:15:54 +0100 Subject: [PATCH] [Compiler] Add more tests for non-power-of-two primitive types --- Compiler/test/codegen.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Compiler/test/codegen.jl b/Compiler/test/codegen.jl index fd8bbae70a346..8a86447d0c8b3 100644 --- a/Compiler/test/codegen.jl +++ b/Compiler/test/codegen.jl @@ -950,6 +950,16 @@ for (T, StructName) in ((Int128, :Issue55558), (UInt128, :UIssue55558)) end end +# Issue #42326 +primitive type PadAfter64_42326 448 end +mutable struct CheckPadAfter64_42326 + a::UInt64 + pad::PadAfter64_42326 + b::UInt64 +end +@test fieldoffset(CheckPadAfter64_42326, 3) == 80 +@test sizeof(CheckPadAfter64_42326) == 96 + @noinline Base.@nospecializeinfer f55768(@nospecialize z::UnionAll) = z === Vector @test f55768(Vector) @test f55768(Vector{T} where T)