Skip to content

behavior tests are tripping an LLVM assertion on mips-linux: Invalid shift amount #13782

Closed
@andrewrk

Description

@andrewrk

Zig Version

0.11.0-dev.526+9e74e4c1f

Steps to Reproduce and Observed Behavior

Reproduction requires an LLVM built with assertions enabled. This is documented in the wiki and these assertions are one of the reasons it is recommended to work on the Zig compiler with an LLVM source build rather than the one provided by a system package.

$ stage4/bin/zig test ../test/behavior.zig -I../test -target mips-linux-none
LLVM Emit Object... zig: /home/andy/Downloads/llvm-project-15/llvm/include/llvm/ADT/APInt.h:840: void llvm::APInt::lshrInPlace(unsigned int): Assertion `ShiftAmt <= BitWidth && "Invalid shift amount"' failed.

Expected Behavior

Expected the behavior tests to pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    arch-mips32-bit and 64-bit MIPSbackend-llvmThe LLVM backend outputs an LLVM IR Module.bugObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.os-linuxregressionIt worked in a previous version of Zig, but stopped working.upstreamAn issue with a third party project that Zig uses.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions