about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJannis Christopher Köhl <mail@koehl.dev>2022-08-31 18:28:25 +0200
committerJannis Christopher Köhl <mail@koehl.dev>2022-11-07 10:35:11 +0100
commit1da30333406f0de9df70159d423d0196f164d8ac (patch)
tree69f452fb850a6eecc09d288ab1861ccb9a81e98e
parente75ad93d958c0c3d4dceaa07cceccc253674a4f2 (diff)
downloadrust-1da30333406f0de9df70159d423d0196f164d8ac.tar.gz
rust-1da30333406f0de9df70159d423d0196f164d8ac.zip
Change test from usize to i32 to prevent target issues
-rw-r--r--src/test/mir-opt/dataflow-const-prop/static_ref.main.DataflowConstProp.diff22
-rw-r--r--src/test/mir-opt/dataflow-const-prop/static_ref.rs2
2 files changed, 12 insertions, 12 deletions
diff --git a/src/test/mir-opt/dataflow-const-prop/static_ref.main.DataflowConstProp.diff b/src/test/mir-opt/dataflow-const-prop/static_ref.main.DataflowConstProp.diff
index 4c6c0bd8f3e..46386ca34d5 100644
--- a/src/test/mir-opt/dataflow-const-prop/static_ref.main.DataflowConstProp.diff
+++ b/src/test/mir-opt/dataflow-const-prop/static_ref.main.DataflowConstProp.diff
@@ -3,16 +3,16 @@
   
   fn main() -> () {
       let mut _0: ();                      // return place in scope 0 at $DIR/static_ref.rs:+0:11: +0:11
-      let _1: usize;                       // in scope 0 at $DIR/static_ref.rs:+2:9: +2:10
-      let mut _3: &usize;                  // in scope 0 at $DIR/static_ref.rs:+4:9: +4:11
-      let _4: &usize;                      // in scope 0 at $DIR/static_ref.rs:+4:9: +4:11
-      let _5: &usize;                      // in scope 0 at $DIR/static_ref.rs:+4:10: +4:11
+      let _1: i32;                         // in scope 0 at $DIR/static_ref.rs:+2:9: +2:10
+      let mut _3: &i32;                    // in scope 0 at $DIR/static_ref.rs:+4:9: +4:11
+      let _4: &i32;                        // in scope 0 at $DIR/static_ref.rs:+4:9: +4:11
+      let _5: &i32;                        // in scope 0 at $DIR/static_ref.rs:+4:10: +4:11
       scope 1 {
           debug x => _1;                   // in scope 1 at $DIR/static_ref.rs:+2:9: +2:10
-          let mut _2: &usize;              // in scope 1 at $DIR/static_ref.rs:+3:9: +3:14
+          let mut _2: &i32;                // in scope 1 at $DIR/static_ref.rs:+3:9: +3:14
           scope 2 {
               debug r => _2;               // in scope 2 at $DIR/static_ref.rs:+3:9: +3:14
-              let _6: usize;               // in scope 2 at $DIR/static_ref.rs:+5:9: +5:10
+              let _6: i32;                 // in scope 2 at $DIR/static_ref.rs:+5:9: +5:10
               scope 3 {
                   debug y => _6;           // in scope 3 at $DIR/static_ref.rs:+5:9: +5:10
               }
@@ -21,16 +21,16 @@
   
       bb0: {
           StorageLive(_1);                 // scope 0 at $DIR/static_ref.rs:+2:9: +2:10
-          _1 = const 0_usize;              // scope 0 at $DIR/static_ref.rs:+2:13: +2:14
+          _1 = const 0_i32;                // scope 0 at $DIR/static_ref.rs:+2:13: +2:14
           StorageLive(_2);                 // scope 1 at $DIR/static_ref.rs:+3:9: +3:14
           _2 = &_1;                        // scope 1 at $DIR/static_ref.rs:+3:17: +3:19
           StorageLive(_3);                 // scope 2 at $DIR/static_ref.rs:+4:9: +4:11
           StorageLive(_4);                 // scope 2 at $DIR/static_ref.rs:+4:9: +4:11
           StorageLive(_5);                 // scope 2 at $DIR/static_ref.rs:+4:10: +4:11
-          _5 = const {alloc1: &usize};     // scope 2 at $DIR/static_ref.rs:+4:10: +4:11
+          _5 = const {alloc1: &i32};       // scope 2 at $DIR/static_ref.rs:+4:10: +4:11
                                            // mir::Constant
                                            // + span: $DIR/static_ref.rs:8:10: 8:11
-                                           // + literal: Const { ty: &usize, val: Value(Scalar(alloc1)) }
+                                           // + literal: Const { ty: &i32, val: Value(Scalar(alloc1)) }
           _4 = &(*_5);                     // scope 2 at $DIR/static_ref.rs:+4:9: +4:11
           _3 = &(*_4);                     // scope 2 at $DIR/static_ref.rs:+4:9: +4:11
           _2 = move _3;                    // scope 2 at $DIR/static_ref.rs:+4:5: +4:11
@@ -47,7 +47,7 @@
       }
   }
   
-  alloc1 (static: P, size: 8, align: 8) {
-      05 00 00 00 00 00 00 00                         │ ........
+  alloc1 (static: P, size: 4, align: 4) {
+      05 00 00 00                                     │ ....
   }
   
diff --git a/src/test/mir-opt/dataflow-const-prop/static_ref.rs b/src/test/mir-opt/dataflow-const-prop/static_ref.rs
index d5e8063cf01..5e60ab1805b 100644
--- a/src/test/mir-opt/dataflow-const-prop/static_ref.rs
+++ b/src/test/mir-opt/dataflow-const-prop/static_ref.rs
@@ -2,7 +2,7 @@
 
 // EMIT_MIR static_ref.main.DataflowConstProp.diff
 fn main() {
-    static P: usize = 5;
+    static P: i32 = 5;
     let x = 0;
     let mut r = &x;
     r = &P;