about summary refs log tree commit diff
path: root/tests/codegen/no-redundant-item-monomorphization.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codegen/no-redundant-item-monomorphization.rs')
-rw-r--r--tests/codegen/no-redundant-item-monomorphization.rs33
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/codegen/no-redundant-item-monomorphization.rs b/tests/codegen/no-redundant-item-monomorphization.rs
deleted file mode 100644
index 466037c3770..00000000000
--- a/tests/codegen/no-redundant-item-monomorphization.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-// Test to make sure that inner functions within a polymorphic outer function
-// don't get re-codegened when the outer function is monomorphized. The test
-// code monomorphizes the outer functions several times, but the magic constants
-// used in the inner functions should each appear only once in the generated IR.
-
-// issue: rust-lang/rust#7349
-//@ compile-flags: -Cno-prepopulate-passes -Copt-level=0
-
-// CHECK-COUNT-1: ret i32 8675309
-// CHECK-COUNT-1: ret i32 11235813
-
-fn outer<T>() {
-    #[allow(dead_code)]
-    fn inner() -> u32 {
-        8675309
-    }
-    inner();
-}
-
-extern "C" fn outer_foreign<T>() {
-    #[allow(dead_code)]
-    fn inner() -> u32 {
-        11235813
-    }
-    inner();
-}
-
-fn main() {
-    outer::<isize>();
-    outer::<usize>();
-    outer_foreign::<isize>();
-    outer_foreign::<usize>();
-}