diff options
| author | bors <bors@rust-lang.org> | 2015-12-02 23:18:11 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-12-02 23:18:11 +0000 |
| commit | abfadfeee691f832b3b47ebd334ec119b0a8379d (patch) | |
| tree | a16140053d7b3728f70e4ae545b1fa8930773688 | |
| parent | 37e337a415a6631911232fe8594670c54613e9a8 (diff) | |
| parent | d7ccea6c1caf63e5245e357899a67d9f2e7db0b1 (diff) | |
| download | rust-abfadfeee691f832b3b47ebd334ec119b0a8379d.tar.gz rust-abfadfeee691f832b3b47ebd334ec119b0a8379d.zip | |
Auto merge of #30165 - dotdash:no_null_elim, r=alexcrichton
This pass causes mis-optimizations in some cases and is probably no longer really important for us, so let's disable it for now. Fixes #30081
| m--------- | src/llvm | 0 | ||||
| -rw-r--r-- | src/rustllvm/llvm-auto-clean-trigger | 2 | ||||
| -rw-r--r-- | src/test/run-pass/issue-30081.rs | 24 |
3 files changed, 25 insertions, 1 deletions
diff --git a/src/llvm b/src/llvm -Subproject cde1ed3196ba9b39bcf028e06e08a8722113a5c +Subproject 3564439515985dc1cc0d77057ed00901635a80a diff --git a/src/rustllvm/llvm-auto-clean-trigger b/src/rustllvm/llvm-auto-clean-trigger index 3b99aa3520b..4ef1fbb506b 100644 --- a/src/rustllvm/llvm-auto-clean-trigger +++ b/src/rustllvm/llvm-auto-clean-trigger @@ -1,4 +1,4 @@ # If this file is modified, then llvm will be forcibly 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. -2015-10-18 +2015-12-02 diff --git a/src/test/run-pass/issue-30081.rs b/src/test/run-pass/issue-30081.rs new file mode 100644 index 00000000000..13e9daa7883 --- /dev/null +++ b/src/test/run-pass/issue-30081.rs @@ -0,0 +1,24 @@ +// Copyright 2012-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. + +// This used to segfault #30081 + +pub enum Instruction { + Increment(i8), + Loop(Box<Box<()>>), +} + +fn main() { + let instrs: Option<(u8, Box<Instruction>)> = None; + instrs.into_iter() + .map(|(_, instr)| instr) + .map(|instr| match *instr { _other => {} }) + .last(); +} |
