]> git.proxmox.com Git - rustc.git/blobdiff - src/test/codegen/consts.rs
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / test / codegen / consts.rs
index 6b4e626df924bf020be2e9d5d6e8ebb201bfc765..ea4c932d43549ce74efb7c6204950922d473e01a 100644 (file)
@@ -11,6 +11,7 @@
 // compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
+#![feature(rustc_attrs)]
 
 // Below, these constants are defined as enum variants that by itself would
 // have a lower alignment than the enum type. Ensure that we mark them
@@ -39,18 +40,21 @@ pub static STATIC: E<i16, i32> = E::A(0);
 
 // CHECK-LABEL: @static_enum_const
 #[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn static_enum_const() -> E<i16, i32> {
    STATIC
 }
 
 // CHECK-LABEL: @inline_enum_const
 #[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn inline_enum_const() -> E<i8, i16> {
     E::A(0)
 }
 
 // CHECK-LABEL: @low_align_const
 #[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn low_align_const() -> E<i16, [i16; 3]> {
 // Check that low_align_const and high_align_const use the same constant
 // CHECK: call void @llvm.memcpy.{{.*}}(i8* %{{[0-9]+}}, i8* {{.*}} [[LOW_HIGH:@const[0-9]+]]
@@ -59,6 +63,7 @@ pub fn low_align_const() -> E<i16, [i16; 3]> {
 
 // CHECK-LABEL: @high_align_const
 #[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn high_align_const() -> E<i16, i32> {
 // Check that low_align_const and high_align_const use the same constant
 // CHECK: call void @llvm.memcpy.{{.*}}(i8* %{{[0-9]}}, i8* {{.*}} [[LOW_HIGH]]