Skip to content

ICE: linkage: LLVM ERROR: global must have a zero initializer! #109681

Open
@matthiaskrgr

Description

@matthiaskrgr

Code

#![crate_type="lib"]
#![feature(linkage)]

#[linkage = "common"]
pub static TEST3: bool = true;

Meta

rustc --version --verbose:

rustc 1.70.0-nightly (db0cbc48d 2023-03-26)
binary: rustc
commit-hash: db0cbc48d4aaa300713a95d9b317a365a474490c
commit-date: 2023-03-26
host: x86_64-unknown-linux-gnu
release: 1.70.0-nightly
LLVM version: 16.0.0

Error output

<output>
Backtrace

'common' global must have a zero initializer!
ptr @_ZN10treereduce5TEST317hd1b26bd49e54e1d4E
LLVM ERROR: Broken module found, compilation aborted!

Metadata

Metadata

Assignees

Labels

A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-bug-has-testStatus: This bug is tracked inside the repo by a `known-bug` test.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.requires-nightlyThis issue requires a nightly compiler in some way.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions