rewrite issue-109934-lto-debuginfo as an ui test
This commit is contained in:
parent
80fb4cab4e
commit
2adfa147d7
4 changed files with 22 additions and 22 deletions
|
@ -48,7 +48,6 @@ run-make/incr-add-rust-src-component/Makefile
|
||||||
run-make/incr-foreign-head-span/Makefile
|
run-make/incr-foreign-head-span/Makefile
|
||||||
run-make/interdependent-c-libraries/Makefile
|
run-make/interdependent-c-libraries/Makefile
|
||||||
run-make/issue-107094/Makefile
|
run-make/issue-107094/Makefile
|
||||||
run-make/issue-109934-lto-debuginfo/Makefile
|
|
||||||
run-make/issue-14698/Makefile
|
run-make/issue-14698/Makefile
|
||||||
run-make/issue-15460/Makefile
|
run-make/issue-15460/Makefile
|
||||||
run-make/issue-18943/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());
|
|
||||||
}
|
|
||||||
}
|
|
22
tests/ui/lto/debuginfo-lto-alloc.rs
Normal file
22
tests/ui/lto/debuginfo-lto-alloc.rs
Normal file
|
@ -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());
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue