summary refs log tree commit diff
path: root/src/test/run-make/issue-36710/foo.rs
blob: 061f07c32434016b3686361998f8331171904e19 (plain)
1
2
3
4
5
6
7
8
9
10
11
// 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 { fn get() -> u32; }

fn main() {
    let i = unsafe { get() };
    assert_eq!(i, 1234);
}