diff --git a/src/llvm b/src/llvm index 86c7a9985d0..b48f77c5ed5 160000 --- a/src/llvm +++ b/src/llvm @@ -1 +1 @@ -Subproject commit 86c7a9985d0855255927d8653ea4d4407de8cc90 +Subproject commit b48f77c5ed570001957408f4adeec88ae010c4d9 diff --git a/src/rustllvm/llvm-rebuild-trigger b/src/rustllvm/llvm-rebuild-trigger index c30290167d4..feb6d98fe46 100644 --- a/src/rustllvm/llvm-rebuild-trigger +++ b/src/rustllvm/llvm-rebuild-trigger @@ -1,4 +1,4 @@ # If this file is modified, then llvm will be (optionally) cleaned and then rebuilt. # The actual contents of this file do not matter, but to trigger a change on the # build bots then the contents should be changed so git updates the mtime. -2017-07-18 +2017-11-07 diff --git a/src/test/run-make/msvc-opt-minsize/Makefile b/src/test/run-make/msvc-opt-minsize/Makefile new file mode 100644 index 00000000000..1095a047dd1 --- /dev/null +++ b/src/test/run-make/msvc-opt-minsize/Makefile @@ -0,0 +1,5 @@ +-include ../tools.mk + +all: + $(RUSTC) foo.rs -Copt-level=z 2>&1 + $(call RUN,foo) diff --git a/src/test/run-make/msvc-opt-minsize/foo.rs b/src/test/run-make/msvc-opt-minsize/foo.rs new file mode 100644 index 00000000000..30b12691afe --- /dev/null +++ b/src/test/run-make/msvc-opt-minsize/foo.rs @@ -0,0 +1,29 @@ +// Copyright 2017 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![feature(test)] +extern crate test; + +fn foo(x: i32, y: i32) -> i64 { + (x + y) as i64 +} + +#[inline(never)] +fn bar() { + let _f = Box::new(0); + // This call used to trigger an LLVM bug in opt-level z where the base + // pointer gets corrupted, see issue #45034 + let y: fn(i32, i32) -> i64 = test::black_box(foo); + test::black_box(y(1, 2)); +} + +fn main() { + bar(); +}