https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70604
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |10.1.0, 11.4.0
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=79472
Resolution|--- |FIXED
Status|NEW |RESOLVED
Target Milestone|--- |8.0
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #2)
>
> I can see
>
> <bb 11>:
> _139 = &MEM[(void *)cmd_84(D) + 930B];
> _141 = conn_140(D)->sess;
> _142 = _141->se_sess;
> _143 = &cmd_84(D)->se_cmd;
> transport_init_se_cmd (_143, &iscsi_ops, _142, 0, 3, 32, _139);
> target_get_sess_cmd (_143, 1);
> switch (_58) <default: <L81>, case 1: <L205>, case 2: <L204>, case 3:
> <L240>, case 4: <L77>, case 5: <L78>, case 6: <L79>, case 7: <L80>>
>
> <L240>:
> goto <bb 19> (<L204>);
>
> <L77>:
> goto <bb 19> (<L204>);
>
> <L78>:
> goto <bb 19> (<L204>);
>
> <L79>:
> goto <bb 19> (<L204>);
>
> <L80>:
> goto <bb 19> (<L204>);
>
> <L81>:
> _146 = (int) _58;
> printk ("\13Unknown iSCSI TMR Function: 0x%02x\n", _146);
> _351 = iscsit_add_reject_from_cmd (cmd_84(D), 10, 1, buf_55(D)); [tail
> call]
> goto <bb 54>;
>
> <L205>:
>
> # prephitmp_14 = PHI <1(18), 2(11), 3(12), 4(13), 5(14), 6(15), 7(16)>
> <L204>:
>
>
> with the default case looping back. switch conversion should probably
> handle this but is run too early. OTOH it seems to be confused by the
> default
> case not falling thru, failing to see the "simple" transform to a
>
> if (... >= 1 && ... <= 7)
> ;
> else
> old default;
>
> beginning to process the following SWITCH statement
> (drivers/target/iscsi/iscsi_target.c:1807) : -------
> switch (_74) <default: <L81>, case 1: <L204>, case 2: <L75>, case 3: <L76>,
> case 4: <L77>, case 5: <L78>, case 6: <L79>, case 7: <L80>>
>
> Bailing out - no common successor to all case label target blocks found
That was fixed by r8-371-g18bfe94032eef1 (PR 79472).
So closing as fixed.