[Bug fortran/56081] Seg fault ICE on select with bad case

sgk at troutmask dot apl.washington.edu gcc-bugzilla@gcc.gnu.org
Wed Jan 23 04:28:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56081

--- Comment #2 from Steve Kargl <sgk at troutmask dot apl.washington.edu> 2013-01-23 04:28:01 UTC ---
On Wed, Jan 23, 2013 at 01:27:11AM +0000, kargl at gcc dot gnu.org wrote:
> Index: match.c
> ===================================================================
> --- match.c     (revision 195396)
> +++ match.c     (working copy)
> @@ -5128,6 +5128,17 @@ gfc_match_select (void)
>    if (m != MATCH_YES)
>      return m;
> 
> +  /* R812 case-expr is scalar-int-expr
> +               or scalar-char-expr
> +               or scalar-logical-expr.  */
> +
> +  if (expr->rank != 0)
> +    {
> +      gfc_error ("case-expr of SELECT construct at %C should be a "
> +                "scalar-int-expr, scalar-char-expr, or scalar-logical-expr");
> +      return MATCH_ERROR;
> +    }
> +
>    new_st.op = EXEC_SELECT;
>    new_st.expr1 = expr;

Patch didn't work.  Time to scratch head. :-/



More information about the Gcc-bugs mailing list