blob: d6855f8760d52b8c8c881aef49175cb09cb606bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// 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.
//@ build-pass
//@ compile-flags: --test -C debuginfo=2 -C lto=fat
//@ no-prefer-dynamic
//@ incremental
extern crate alloc;
#[cfg(test)]
mod tests {
#[test]
fn something_alloc() {
assert_eq!(Vec::<u32>::new(), Vec::<u32>::new());
}
}
|