Skip to content

Commit dd1f310

Browse files
authored
Unrolled build for rust-lang#113807
Rollup merge of rust-lang#113807 - mojingran:master, r=WaffleLapkin Tests crash from inappropriate use of common linkage Follows up my proposal under the [tracking issue for the linkage feature](rust-lang#29603 (comment)). Adds test for [issue 109681](rust-lang#109681).
2 parents 62ebe3a + 4160337 commit dd1f310

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// build-fail
2+
// failure-status: 101
3+
// known-bug: #109681
4+
5+
// This test verifies that we continue to hit the LLVM error for common linkage with non-zero
6+
// initializers, since it generates invalid LLVM IR.
7+
// Linkages are internal features marked as perma-unstable, so we don't need to fix the issue
8+
// for now.
9+
#![crate_type="lib"]
10+
#![feature(linkage)]
11+
12+
#[linkage = "common"]
13+
#[no_mangle]
14+
pub static TEST: bool = true;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
'common' global must have a zero initializer!
2+
ptr @TEST
3+
LLVM ERROR: Broken module found, compilation aborted!

0 commit comments

Comments
 (0)