https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112687

Drea Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot 
gnu.org

--- Comment #4 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Filip Kastl from comment #3)
> I just revisited this problem and thought of another solution: We could just
> tell (early) vrp to not throw out the default case when it finds that it
> never gets executed. Instead, vrp could just make sure the default case
> points to __builtin_unreachable.
> 
> I think this would be a better solution. Leaving the default case but
> marking it as unreachable conveys more information to the passes runing
> after vrp about the switch statement.
> 
> I'll post an RFC about this.

So I don't think it is evrp which throws that away directly but rather
group_case_labels_stmt.

I am testing a patch which removes that part. So mine for now.

Reply via email to