Skip to content

Wrong return for supertype() in functions for compiled sysimage with option--strip-ir #51751

@kruxigt

Description

@kruxigt

I compile a package to a sysimage with the options --strip-ir --compile=all
I have the two following functions in my package

function test_supertype(t::Type)
    return supertype(t)
end

function test_supertype_math(t::Type{T}) where T <: Number
    return supertype(t)
end

when using the sysimage I get

test_supertype(Int64) -> Signed (correct)
test_supertype_math(Int64) -> Integer (incorrect)

This only happens with the --strip-ir option. It seems like it could be a bug, or am I doing something wrong?

PackageCompiler v2.1.5
versioninfo()
Julia Version 1.10.0-beta3
Commit 404750f (2023-10-03 12:53 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: macOS (x86_64-apple-darwin22.4.0)
CPU: 8 × Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, icelake-client)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behavior

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions