Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

ices/82326.sh: fixed with no errors #668

Merged
merged 1 commit into from
Feb 24, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#82326

#!/bin/bash

rustc -Zunpretty=mir-cfg - <<'EOF'
const TAG: &'static [u8] = b"ABCD";

fn main() {
    match &[][..] {
        TAG => println!("Yes."),
        _ => println!("No."),
    }
}
EOF
=== stdout ===
digraph __crate__ {
subgraph cluster_Mir_0_4 {
    graph [fontname="Courier, monospace"];
    node [fontname="Courier, monospace"];
    edge [fontname="Courier, monospace"];
    label=<fn main() -&gt; ()<br align="left"/>let mut _1: &amp;[u8];<br align="left"/>let _2: &amp;[u8];<br align="left"/>let mut _3: &amp;[u8; 0];<br align="left"/>let mut _4: std::ops::RangeFull;<br align="left"/>let mut _5: usize;<br align="left"/>let mut _6: usize;<br align="left"/>let mut _7: bool;<br align="left"/>let _8: ();<br align="left"/>let mut _9: std::fmt::Arguments;<br align="left"/>let mut _10: &amp;[&amp;str];<br align="left"/>let mut _11: &amp;[&amp;str; 1];<br align="left"/>let _12: &amp;[&amp;str; 1];<br align="left"/>let mut _13: &amp;[std::fmt::ArgumentV1];<br align="left"/>let mut _14: &amp;[std::fmt::ArgumentV1; 0];<br align="left"/>let _15: &amp;[std::fmt::ArgumentV1; 0];<br align="left"/>let _16: ();<br align="left"/>let mut _17: std::fmt::Arguments;<br align="left"/>let mut _18: &amp;[&amp;str];<br align="left"/>let mut _19: &amp;[&amp;str; 1];<br align="left"/>let _20: &amp;[&amp;str; 1];<br align="left"/>let mut _21: &amp;[std::fmt::ArgumentV1];<br align="left"/>let mut _22: &amp;[std::fmt::ArgumentV1; 0];<br align="left"/>let _23: &amp;[std::fmt::ArgumentV1; 0];<br align="left"/>let mut _24: &amp;[std::fmt::ArgumentV1; 0];<br align="left"/>let mut _25: &amp;[&amp;str; 1];<br align="left"/>let mut _26: &amp;[std::fmt::ArgumentV1; 0];<br align="left"/>let mut _27: &amp;[&amp;str; 1];<br align="left"/>let mut _28: &amp;[u8; 0];<br align="left"/>>;
    bb0__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">0</td></tr><tr><td align="left" balign="left">StorageLive(_1)<br/>StorageLive(_2)<br/>StorageLive(_3)<br/>_28 = const main::promoted[4]<br/>_3 = _28<br/>StorageLive(_4)<br/></td></tr><tr><td align="left">_2 = &lt;[u8; 0] as Index&lt;RangeFull&gt;&gt;::index(move _3, move _4)</td></tr></table>>];
    bb1__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">1</td></tr><tr><td align="left" balign="left">StorageDead(_4)<br/>StorageDead(_3)<br/>_1 = _2<br/>_5 = Len((*_1))<br/>_6 = const 4_usize<br/>_7 = Eq(move _5, move _6)<br/></td></tr><tr><td align="left">switchInt(move _7)</td></tr></table>>];
    bb2__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">2</td></tr><tr><td align="left">switchInt((*_1)[0 of 4])</td></tr></table>>];
    bb3__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">3</td></tr><tr><td align="left">switchInt((*_1)[1 of 4])</td></tr></table>>];
    bb4__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">4</td></tr><tr><td align="left">switchInt((*_1)[2 of 4])</td></tr></table>>];
    bb5__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">5</td></tr><tr><td align="left">switchInt((*_1)[3 of 4])</td></tr></table>>];
    bb6__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">6</td></tr><tr><td align="left" balign="left">StorageLive(_16)<br/>StorageLive(_17)<br/>StorageLive(_18)<br/>StorageLive(_19)<br/>StorageLive(_20)<br/>_25 = const main::promoted[1]<br/>_20 = _25<br/>_19 = _20<br/>_18 = move _19 as &amp;[&amp;str] (Pointer(Unsize))<br/>StorageDead(_19)<br/>StorageLive(_21)<br/>StorageLive(_22)<br/>StorageLive(_23)<br/>_24 = const main::promoted[0]<br/>_23 = _24<br/>_22 = _23<br/>_21 = move _22 as &amp;[std::fmt::ArgumentV1] (Pointer(Unsize))<br/>StorageDead(_22)<br/></td></tr><tr><td align="left">_17 = Arguments::new_v1(move _18, move _21)</td></tr></table>>];
    bb7__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">7</td></tr><tr><td align="left" balign="left">StorageLive(_8)<br/>StorageLive(_9)<br/>StorageLive(_10)<br/>StorageLive(_11)<br/>StorageLive(_12)<br/>_27 = const main::promoted[3]<br/>_12 = _27<br/>_11 = _12<br/>_10 = move _11 as &amp;[&amp;str] (Pointer(Unsize))<br/>StorageDead(_11)<br/>StorageLive(_13)<br/>StorageLive(_14)<br/>StorageLive(_15)<br/>_26 = const main::promoted[2]<br/>_15 = _26<br/>_14 = _15<br/>_13 = move _14 as &amp;[std::fmt::ArgumentV1] (Pointer(Unsize))<br/>StorageDead(_14)<br/></td></tr><tr><td align="left">_9 = Arguments::new_v1(move _10, move _13)</td></tr></table>>];
    bb8__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">8</td></tr><tr><td align="left" balign="left">StorageDead(_13)<br/>StorageDead(_10)<br/></td></tr><tr><td align="left">_8 = _print(move _9)</td></tr></table>>];
    bb9__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">9</td></tr><tr><td align="left" balign="left">StorageDead(_9)<br/>StorageDead(_15)<br/>StorageDead(_12)<br/>StorageDead(_8)<br/>_0 = const ()<br/></td></tr><tr><td align="left">goto</td></tr></table>>];
    bb10__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">10</td></tr><tr><td align="left" balign="left">StorageDead(_21)<br/>StorageDead(_18)<br/></td></tr><tr><td align="left">_16 = _print(move _17)</td></tr></table>>];
    bb11__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">11</td></tr><tr><td align="left" balign="left">StorageDead(_17)<br/>StorageDead(_23)<br/>StorageDead(_20)<br/>StorageDead(_16)<br/>_0 = const ()<br/></td></tr><tr><td align="left">goto</td></tr></table>>];
    bb12__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">12</td></tr><tr><td align="left" balign="left">StorageDead(_2)<br/>StorageDead(_1)<br/></td></tr><tr><td align="left">return</td></tr></table>>];
    bb0__0_4 -> bb1__0_4 [label="return"];
    bb1__0_4 -> bb6__0_4 [label="false"];
    bb1__0_4 -> bb2__0_4 [label="otherwise"];
    bb2__0_4 -> bb3__0_4 [label="65_u8"];
    bb2__0_4 -> bb6__0_4 [label="otherwise"];
    bb3__0_4 -> bb4__0_4 [label="66_u8"];
    bb3__0_4 -> bb6__0_4 [label="otherwise"];
    bb4__0_4 -> bb5__0_4 [label="67_u8"];
    bb4__0_4 -> bb6__0_4 [label="otherwise"];
    bb5__0_4 -> bb7__0_4 [label="68_u8"];
    bb5__0_4 -> bb6__0_4 [label="otherwise"];
    bb6__0_4 -> bb10__0_4 [label="return"];
    bb7__0_4 -> bb8__0_4 [label="return"];
    bb8__0_4 -> bb9__0_4 [label="return"];
    bb9__0_4 -> bb12__0_4 [label=""];
    bb10__0_4 -> bb11__0_4 [label="return"];
    bb11__0_4 -> bb12__0_4 [label=""];
}
subgraph cluster_Mir_0_3 {
    graph [fontname="Courier, monospace"];
    node [fontname="Courier, monospace"];
    edge [fontname="Courier, monospace"];
    label=<fn TAG() -&gt; &amp;[u8]<br align="left"/>let mut _1: &amp;[u8; 4];<br align="left"/>let _2: &amp;[u8; 4];<br align="left"/>>;
    bb0__0_3 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">0</td></tr><tr><td align="left" balign="left">StorageLive(_1)<br/>StorageLive(_2)<br/>_2 = const b&quot;ABCD&quot;<br/>_1 = &amp;(*_2)<br/>_0 = move _1 as &amp;[u8] (Pointer(Unsize))<br/>StorageDead(_2)<br/>StorageDead(_1)<br/></td></tr><tr><td align="left">return</td></tr></table>>];
}
}
=== stderr ===
==============

=== stdout ===
digraph __crate__ {
subgraph cluster_Mir_0_4 {
    graph [fontname="Courier, monospace"];
    node [fontname="Courier, monospace"];
    edge [fontname="Courier, monospace"];
    label=<fn main() -&gt; ()<br align="left"/>let mut _1: &amp;[u8];<br align="left"/>let _2: &amp;[u8];<br align="left"/>let mut _3: &amp;[u8; 0];<br align="left"/>let mut _4: std::ops::RangeFull;<br align="left"/>let mut _5: usize;<br align="left"/>let mut _6: usize;<br align="left"/>let mut _7: bool;<br align="left"/>let _8: ();<br align="left"/>let mut _9: std::fmt::Arguments;<br align="left"/>let mut _10: &amp;[&amp;str];<br align="left"/>let mut _11: &amp;[&amp;str; 1];<br align="left"/>let _12: &amp;[&amp;str; 1];<br align="left"/>let mut _13: &amp;[std::fmt::ArgumentV1];<br align="left"/>let mut _14: &amp;[std::fmt::ArgumentV1; 0];<br align="left"/>let _15: &amp;[std::fmt::ArgumentV1; 0];<br align="left"/>let _16: ();<br align="left"/>let mut _17: std::fmt::Arguments;<br align="left"/>let mut _18: &amp;[&amp;str];<br align="left"/>let mut _19: &amp;[&amp;str; 1];<br align="left"/>let _20: &amp;[&amp;str; 1];<br align="left"/>let mut _21: &amp;[std::fmt::ArgumentV1];<br align="left"/>let mut _22: &amp;[std::fmt::ArgumentV1; 0];<br align="left"/>let _23: &amp;[std::fmt::ArgumentV1; 0];<br align="left"/>let mut _24: &amp;[std::fmt::ArgumentV1; 0];<br align="left"/>let mut _25: &amp;[&amp;str; 1];<br align="left"/>let mut _26: &amp;[std::fmt::ArgumentV1; 0];<br align="left"/>let mut _27: &amp;[&amp;str; 1];<br align="left"/>let mut _28: &amp;[u8; 0];<br align="left"/>>;
    bb0__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">0</td></tr><tr><td align="left" balign="left">StorageLive(_1)<br/>StorageLive(_2)<br/>StorageLive(_3)<br/>_28 = const main::promoted[4]<br/>_3 = _28<br/>StorageLive(_4)<br/></td></tr><tr><td align="left">_2 = &lt;[u8; 0] as Index&lt;RangeFull&gt;&gt;::index(move _3, move _4)</td></tr></table>>];
    bb1__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">1</td></tr><tr><td align="left" balign="left">StorageDead(_4)<br/>StorageDead(_3)<br/>_1 = _2<br/>_5 = Len((*_1))<br/>_6 = const 4_usize<br/>_7 = Eq(move _5, move _6)<br/></td></tr><tr><td align="left">switchInt(move _7)</td></tr></table>>];
    bb2__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">2</td></tr><tr><td align="left">switchInt((*_1)[0 of 4])</td></tr></table>>];
    bb3__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">3</td></tr><tr><td align="left">switchInt((*_1)[1 of 4])</td></tr></table>>];
    bb4__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">4</td></tr><tr><td align="left">switchInt((*_1)[2 of 4])</td></tr></table>>];
    bb5__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">5</td></tr><tr><td align="left">switchInt((*_1)[3 of 4])</td></tr></table>>];
    bb6__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">6</td></tr><tr><td align="left" balign="left">StorageLive(_16)<br/>StorageLive(_17)<br/>StorageLive(_18)<br/>StorageLive(_19)<br/>StorageLive(_20)<br/>_25 = const main::promoted[1]<br/>_20 = _25<br/>_19 = _20<br/>_18 = move _19 as &amp;[&amp;str] (Pointer(Unsize))<br/>StorageDead(_19)<br/>StorageLive(_21)<br/>StorageLive(_22)<br/>StorageLive(_23)<br/>_24 = const main::promoted[0]<br/>_23 = _24<br/>_22 = _23<br/>_21 = move _22 as &amp;[std::fmt::ArgumentV1] (Pointer(Unsize))<br/>StorageDead(_22)<br/></td></tr><tr><td align="left">_17 = Arguments::new_v1(move _18, move _21)</td></tr></table>>];
    bb7__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">7</td></tr><tr><td align="left" balign="left">StorageLive(_8)<br/>StorageLive(_9)<br/>StorageLive(_10)<br/>StorageLive(_11)<br/>StorageLive(_12)<br/>_27 = const main::promoted[3]<br/>_12 = _27<br/>_11 = _12<br/>_10 = move _11 as &amp;[&amp;str] (Pointer(Unsize))<br/>StorageDead(_11)<br/>StorageLive(_13)<br/>StorageLive(_14)<br/>StorageLive(_15)<br/>_26 = const main::promoted[2]<br/>_15 = _26<br/>_14 = _15<br/>_13 = move _14 as &amp;[std::fmt::ArgumentV1] (Pointer(Unsize))<br/>StorageDead(_14)<br/></td></tr><tr><td align="left">_9 = Arguments::new_v1(move _10, move _13)</td></tr></table>>];
    bb8__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">8</td></tr><tr><td align="left" balign="left">StorageDead(_13)<br/>StorageDead(_10)<br/></td></tr><tr><td align="left">_8 = _print(move _9)</td></tr></table>>];
    bb9__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">9</td></tr><tr><td align="left" balign="left">StorageDead(_9)<br/>StorageDead(_15)<br/>StorageDead(_12)<br/>StorageDead(_8)<br/>_0 = const ()<br/></td></tr><tr><td align="left">goto</td></tr></table>>];
    bb10__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">10</td></tr><tr><td align="left" balign="left">StorageDead(_21)<br/>StorageDead(_18)<br/></td></tr><tr><td align="left">_16 = _print(move _17)</td></tr></table>>];
    bb11__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">11</td></tr><tr><td align="left" balign="left">StorageDead(_17)<br/>StorageDead(_23)<br/>StorageDead(_20)<br/>StorageDead(_16)<br/>_0 = const ()<br/></td></tr><tr><td align="left">goto</td></tr></table>>];
    bb12__0_4 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">12</td></tr><tr><td align="left" balign="left">StorageDead(_2)<br/>StorageDead(_1)<br/></td></tr><tr><td align="left">return</td></tr></table>>];
    bb0__0_4 -> bb1__0_4 [label="return"];
    bb1__0_4 -> bb6__0_4 [label="false"];
    bb1__0_4 -> bb2__0_4 [label="otherwise"];
    bb2__0_4 -> bb3__0_4 [label="65_u8"];
    bb2__0_4 -> bb6__0_4 [label="otherwise"];
    bb3__0_4 -> bb4__0_4 [label="66_u8"];
    bb3__0_4 -> bb6__0_4 [label="otherwise"];
    bb4__0_4 -> bb5__0_4 [label="67_u8"];
    bb4__0_4 -> bb6__0_4 [label="otherwise"];
    bb5__0_4 -> bb7__0_4 [label="68_u8"];
    bb5__0_4 -> bb6__0_4 [label="otherwise"];
    bb6__0_4 -> bb10__0_4 [label="return"];
    bb7__0_4 -> bb8__0_4 [label="return"];
    bb8__0_4 -> bb9__0_4 [label="return"];
    bb9__0_4 -> bb12__0_4 [label=""];
    bb10__0_4 -> bb11__0_4 [label="return"];
    bb11__0_4 -> bb12__0_4 [label=""];
}
subgraph cluster_Mir_0_3 {
    graph [fontname="Courier, monospace"];
    node [fontname="Courier, monospace"];
    edge [fontname="Courier, monospace"];
    label=<fn TAG() -&gt; &amp;[u8]<br align="left"/>let mut _1: &amp;[u8; 4];<br align="left"/>let _2: &amp;[u8; 4];<br align="left"/>>;
    bb0__0_3 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">0</td></tr><tr><td align="left" balign="left">StorageLive(_1)<br/>StorageLive(_2)<br/>_2 = const b&quot;ABCD&quot;<br/>_1 = &amp;(*_2)<br/>_0 = move _1 as &amp;[u8] (Pointer(Unsize))<br/>StorageDead(_2)<br/>StorageDead(_1)<br/></td></tr><tr><td align="left">return</td></tr></table>>];
}
}
=== stderr ===
==============
@JohnTitor JohnTitor merged commit 73865fb into master Feb 24, 2021
@JohnTitor JohnTitor deleted the autofix/ices/82326.sh branch February 24, 2021 13:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants