summaryrefslogtreecommitdiffstats
path: root/src/test/run-make/raw-dylib-import-name-type/driver.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:32 +0000
commit4547b622d8d29df964fa2914213088b148c498fc (patch)
tree9fc6b25f3c3add6b745be9a2400a6e96140046e9 /src/test/run-make/raw-dylib-import-name-type/driver.rs
parentReleasing progress-linux version 1.66.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-4547b622d8d29df964fa2914213088b148c498fc.tar.xz
rustc-4547b622d8d29df964fa2914213088b148c498fc.zip
Merging upstream version 1.67.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/run-make/raw-dylib-import-name-type/driver.rs')
-rw-r--r--src/test/run-make/raw-dylib-import-name-type/driver.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/run-make/raw-dylib-import-name-type/driver.rs b/src/test/run-make/raw-dylib-import-name-type/driver.rs
index a38849fc8..9a3cd9ebe 100644
--- a/src/test/run-make/raw-dylib-import-name-type/driver.rs
+++ b/src/test/run-make/raw-dylib-import-name-type/driver.rs
@@ -3,6 +3,7 @@
#[link(name = "extern", kind = "raw-dylib", import_name_type = "undecorated")]
extern "C" {
+ fn LooksLikeAPrivateGlobal(i: i32);
fn cdecl_fn_undecorated(i: i32);
#[link_name = "cdecl_fn_undecorated2"]
fn cdecl_fn_undecorated_renamed(i: i32);
@@ -84,6 +85,13 @@ extern {
pub fn main() {
unsafe {
+ // Regression test for #104453
+ // On x86 LLVM uses 'L' as the prefix for private globals (PrivateGlobalPrefix), which
+ // causes it to believe that undecorated functions starting with 'L' are actually temporary
+ // symbols that it generated, which causes a later check to fail as the symbols we are
+ // creating don't have definitions (whereas all temporary symbols do).
+ LooksLikeAPrivateGlobal(13);
+
cdecl_fn_undecorated(1);
cdecl_fn_undecorated_renamed(10);
cdecl_fn_noprefix(2);