diff options
| author | Björn Steinbrink <bsteinbr@gmail.com> | 2017-11-07 09:55:55 +0100 |
|---|---|---|
| committer | Björn Steinbrink <bsteinbr@gmail.com> | 2017-11-12 15:12:02 +0100 |
| commit | 1a8c9f895d158cb09937e452f7635983fe507f8c (patch) | |
| tree | 0f002bef979a03b9aa7ff738859ca8d5f2c90336 | |
| parent | 69ee5a8a9787336f8635ec12ed0c6199a70505e0 (diff) | |
| download | rust-1a8c9f895d158cb09937e452f7635983fe507f8c.tar.gz rust-1a8c9f895d158cb09937e452f7635983fe507f8c.zip | |
Update LLVM to fix miscompiles with -Copt-level=z on Windows
Fixes #45034
| m--------- | src/llvm | 0 | ||||
| -rw-r--r-- | src/rustllvm/llvm-rebuild-trigger | 2 | ||||
| -rw-r--r-- | src/test/run-make/msvc-opt-minsize/Makefile | 5 | ||||
| -rw-r--r-- | src/test/run-make/msvc-opt-minsize/foo.rs | 29 |
4 files changed, 35 insertions, 1 deletions
diff --git a/src/llvm b/src/llvm -Subproject 86c7a9985d0855255927d8653ea4d4407de8cc9 +Subproject b48f77c5ed570001957408f4adeec88ae010c4d 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 <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. + +#![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(); +} |
