mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-03 17:35:28 +03:00
rewrite issue-109934-lto-debuginfo as an ui test
This commit is contained in:
@@ -48,7 +48,6 @@ run-make/incr-add-rust-src-component/Makefile
|
||||
run-make/incr-foreign-head-span/Makefile
|
||||
run-make/interdependent-c-libraries/Makefile
|
||||
run-make/issue-107094/Makefile
|
||||
run-make/issue-109934-lto-debuginfo/Makefile
|
||||
run-make/issue-14698/Makefile
|
||||
run-make/issue-15460/Makefile
|
||||
run-make/issue-18943/Makefile
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
# ignore-cross-compile
|
||||
include ../tools.mk
|
||||
|
||||
# With the upgrade to LLVM 16, this was getting:
|
||||
#
|
||||
# error: Cannot represent a difference across sections
|
||||
#
|
||||
# The error stemmed from DI function definitions under type scopes, fixed by
|
||||
# only declaring in type scope and defining the subprogram elsewhere.
|
||||
|
||||
all:
|
||||
$(RUSTC) lib.rs --test -C lto=fat -C debuginfo=2 -C incremental=$(TMPDIR)/inc-fat
|
||||
@@ -1,9 +0,0 @@
|
||||
extern crate alloc;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
fn something_alloc() {
|
||||
assert_eq!(Vec::<u32>::new(), Vec::<u32>::new());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// With the upgrade to LLVM 16, the following error appeared when using
|
||||
// link-time-optimization (LTO) alloc and debug compilation mode simultaneously:
|
||||
//
|
||||
// error: Cannot represent a difference across sections
|
||||
//
|
||||
// The error stemmed from DI function definitions under type scopes, fixed by
|
||||
// only declaring in type scope and defining the subprogram elsewhere.
|
||||
// This test reproduces the circumstances that caused the error to appear, and checks
|
||||
// that compilation is successful.
|
||||
|
||||
//@ check-pass
|
||||
//@ compile-flags: --test -C debuginfo=2 -C lto=fat -C incremental=inc-fat
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
fn something_alloc() {
|
||||
assert_eq!(Vec::<u32>::new(), Vec::<u32>::new());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user