Skip to content

LLVM error and build failure: "piece covers entire variable" #35547

Closed
@bfops

Description

@bfops

This aggressive build failure happens consistently if you try to build rust-clippy with opt-level=1 set. Here's a fork that does it out of the box: https://github.com/bfops/rust-clippy.git.

piece covers entire variable
  tail call void @llvm.dbg.value(metadata %"17.rustc::hir::Expr"** %1, i64 0, metadata !70093, metadata !8774), !dbg !70097
!70093 = !DILocalVariable(arg: 3, scope: !70077, file: !41572, line: 1948, type: !9419)
!8774 = !DIExpression(DW_OP_bit_piece, 0, 64)
piece is larger than or outside of variable
  tail call void @llvm.dbg.value(metadata %"17.rustc::hir::Expr"** %2, i64 0, metadata !70093, metadata !8776), !dbg !70097
!70093 = !DILocalVariable(arg: 3, scope: !70077, file: !41572, line: 1948, type: !9419)
!8776 = !DIExpression(DW_OP_bit_piece, 64, 64)
LLVM ERROR: Broken function found, compilation aborted!
error: Could not compile `clippy_lints`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions