2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2016-01-21 18:57:43 +02:00
|
|
|
fn test1(f: f32) -> bool {
|
|
|
|
// test that we properly promote temporaries to allocas when a temporary is assigned to
|
|
|
|
// multiple times (assignment is still happening once ∀ possible dataflows).
|
|
|
|
!(f.is_nan() || f.is_infinite())
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
assert_eq!(test1(0.0), true);
|
|
|
|
}
|