Auto merge of #36958 - nikomatsakis:issue-36856, r=eddyb

force `i1` booleans to `i8` when comparing

Work around LLVM bug.

cc #36856

r? @eddyb
This commit is contained in:
bors 2016-10-04 23:13:08 -07:00 committed by GitHub
commit 506f80730f
2 changed files with 34 additions and 1 deletions

View file

@ -0,0 +1,24 @@
// Copyright 2012 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.
// Regression test for #36856.
// compile-flags:-g
fn g() -> bool {
false
}
pub fn main() {
let a = !g();
if a != !g() {
panic!();
}
}