blob: 845844f427bdf1177edb4ceebaf7746126b2cc6d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// Tests that linking to C++ code with global destructors works.
// For linking libstdc++ on MinGW
#![cfg_attr(all(windows, target_env = "gnu"), feature(static_nobundle))]
extern "C" {
fn get() -> u32;
}
fn main() {
let i = unsafe { get() };
assert_eq!(i, 1234);
}
|