File tree 3 files changed +22
-21
lines changed
run-make/issue-109934-lto-debuginfo
3 files changed +22
-21
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // With the upgrade to LLVM 16, the following error appeared when using
2
+ // link-time-optimization (LTO) alloc and debug compilation mode simultaneously:
3
+ //
4
+ // error: Cannot represent a difference across sections
5
+ //
6
+ // The error stemmed from DI function definitions under type scopes, fixed by
7
+ // only declaring in type scope and defining the subprogram elsewhere.
8
+ // This test reproduces the circumstances that caused the error to appear, and checks
9
+ // that compilation is successful.
10
+
11
+ //@ check-pass
12
+ //@ compile-flags: --test -C debuginfo=2 -C lto=fat -C incremental=inc-fat
13
+
14
+ extern crate alloc;
15
+
16
+ #[ cfg( test) ]
17
+ mod tests {
18
+ #[ test]
19
+ fn something_alloc ( ) {
20
+ assert_eq ! ( Vec :: <u32 >:: new( ) , Vec :: <u32 >:: new( ) ) ;
21
+ }
22
+ }
You can’t perform that action at this time.
0 commit comments