about summary refs log tree commit diff
path: root/src/test/codegen
diff options
context:
space:
mode:
authorRichard Diamond <wichard@vitalitystudios.com>2015-09-06 19:26:41 -0500
committerRichard Diamond <wichard@vitalitystudios.com>2015-09-06 19:26:41 -0500
commitba72d9722caf48ad5f184d4da61117f80d98761e (patch)
tree7cc168bbb00d87c0c29ae06c4afca394c3c8dd21 /src/test/codegen
parent01b9cc58ba0c91ec265d8c1ad9225b2ca777464e (diff)
Don't add unnamed address attributes to intrinsics.
Intrinsics never have an address, so it doesn't make sense to say that their
address is unnamed.
Diffstat (limited to 'src/test/codegen')
-rw-r--r--src/test/codegen/intrinsic-no-unnamed-attr.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/codegen/intrinsic-no-unnamed-attr.rs b/src/test/codegen/intrinsic-no-unnamed-attr.rs
new file mode 100644
index 00000000000..0f239c84265
--- /dev/null
+++ b/src/test/codegen/intrinsic-no-unnamed-attr.rs
@@ -0,0 +1,22 @@
+// Copyright 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.
+
+// compile-flags: -C no-prepopulate-passes
+
+#![feature(intrinsics)]
+
+extern "rust-intrinsic" {
+    fn sqrtf32(x: f32) -> f32;
+}
+// CHECK: @llvm.sqrt.f32(float) #{{[0-9]*}}
+
+fn main() {
+    unsafe { sqrtf32(0.0f32); }
+}