diff options
| author | bors <bors@rust-lang.org> | 2015-11-04 06:07:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-11-04 06:07:24 +0000 |
| commit | cc403b6c33ded2c99ff75207cd2c83290942bc39 (patch) | |
| tree | 6cac30d8ca9719a654176e1914447f50eef2b262 /src/test | |
| parent | a216e847272ddbd3033037b606eaf2d801c250b9 (diff) | |
| parent | 9fe4e962e1fe7a4c1d603d1549800d105ca5941f (diff) | |
| download | rust-cc403b6c33ded2c99ff75207cd2c83290942bc39.tar.gz rust-cc403b6c33ded2c99ff75207cd2c83290942bc39.zip | |
Auto merge of #29478 - angelsl:msvc2, r=alexcrichton
r? @alexcrichton
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-make/compiler-rt-works-on-mingw/Makefile | 17 | ||||
| -rw-r--r-- | src/test/run-make/compiler-rt-works-on-mingw/foo.cpp | 5 | ||||
| -rw-r--r-- | src/test/run-make/compiler-rt-works-on-mingw/foo.rs | 16 |
3 files changed, 38 insertions, 0 deletions
diff --git a/src/test/run-make/compiler-rt-works-on-mingw/Makefile b/src/test/run-make/compiler-rt-works-on-mingw/Makefile new file mode 100644 index 00000000000..4ec54f73e67 --- /dev/null +++ b/src/test/run-make/compiler-rt-works-on-mingw/Makefile @@ -0,0 +1,17 @@ +-include ../tools.mk + +ifneq (,$(findstring MINGW,$(UNAME))) +ifndef IS_MSVC +all: + g++ foo.cpp -c -o $(TMPDIR)/foo.o + ar crus $(TMPDIR)/libfoo.a $(TMPDIR)/foo.o + $(RUSTC) foo.rs -lfoo -lstdc++ + $(call RUN,foo) +else +all: + +endif +else +all: + +endif diff --git a/src/test/run-make/compiler-rt-works-on-mingw/foo.cpp b/src/test/run-make/compiler-rt-works-on-mingw/foo.cpp new file mode 100644 index 00000000000..aac3ba42201 --- /dev/null +++ b/src/test/run-make/compiler-rt-works-on-mingw/foo.cpp @@ -0,0 +1,5 @@ +// ignore-license +extern "C" void foo() { + int *a = new int(3); + delete a; +} diff --git a/src/test/run-make/compiler-rt-works-on-mingw/foo.rs b/src/test/run-make/compiler-rt-works-on-mingw/foo.rs new file mode 100644 index 00000000000..293f9d58294 --- /dev/null +++ b/src/test/run-make/compiler-rt-works-on-mingw/foo.rs @@ -0,0 +1,16 @@ +// Copyright 2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +extern { fn foo(); } + +pub fn main() { + unsafe { foo(); } + assert_eq!(7f32.powi(3), 343f32); +} |
