Skip to content

Commit

Permalink
rewrite issue-109934-lto-debuginfo as an ui test
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jul 9, 2024
1 parent 80fb4ca commit 2adfa14
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 0 additions & 12 deletions tests/run-make/issue-109934-lto-debuginfo/Makefile

This file was deleted.

9 changes: 0 additions & 9 deletions tests/run-make/issue-109934-lto-debuginfo/lib.rs

This file was deleted.

22 changes: 22 additions & 0 deletions tests/ui/lto/debuginfo-lto-alloc.rs
Original file line number Diff line number Diff line change
@@ -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());
}
}

0 comments on commit 2adfa14

Please sign in to comment.