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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #5 from kargl at gcc dot gnu.org ---
(In reply to Steven Bosscher from comment #4)
>
> Problem is a simple list walk error if the unreachable case is the
> last in the list.  Plugged with the following patch.
> 

You must be bored if you're looking at Fortran bugs again. :-)

> Index: resolve.c
> ===================================================================
> --- resolve.c   (revision 214292)
> +++ resolve.c   (working copy)
> @@ -7761,7 +7761,7 @@ resolve_select (gfc_code *code, bool select_type)
>         /* Strip all other unreachable cases.  */
>         if (body->ext.block.case_list)
>           {
> -           for (cp = body->ext.block.case_list; cp->next; cp = cp->next)
> +           for (cp = body->ext.block.case_list; cp && cp->next; cp =
> cp->next)
>               {
>                 if (cp->next->unreachable)
>                   {

Looks obvious now.  If the ICE is fixed, then please commit.

Reply via email to