blob: 4d48a5f0ac528e2d138504350b4a2463abed0447 (
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
25
26
|
// revisions: cfail1 cfail2
// build-pass
// rust-lang/rust#69798:
//
// This is analgous to cgu_invalidated_when_import_added, but it covers a
// problem uncovered where a change to the *export* set caused a link failure
// when reusing post-LTO optimized object code.
pub struct Foo {}
impl Drop for Foo {
fn drop(&mut self) {
println!("Dropping Foo");
}
}
#[no_mangle]
pub extern "C" fn run() {
thread_local! { pub static FOO : Foo = Foo { } ; }
#[cfg(cfail2)]
{
FOO.with(|_f| ())
}
}
pub fn main() { run() }
|