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

--- Comment #4 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Wed, May 27, 2020 at 08:04:22PM +0000, anlauf at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95373
> 
> --- Comment #3 from anlauf at gcc dot gnu.org ---
> Patch:
> 
> diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c
> index d73898473df..67105cc9ab1 100644
> --- a/gcc/fortran/primary.c
> +++ b/gcc/fortran/primary.c
> @@ -1998,6 +1998,28 @@ is_inquiry_ref (const char *name, gfc_ref **ref)
>    else
>      return false;
> 
> +  switch (type)
> +    {
> +    case INQUIRY_RE:
> +    case INQUIRY_IM:
> +      if (!gfc_notify_std (GFC_STD_F2008, "RE or IM part_ref at %C"))
> +       return false;
> +      break;
> +
> +    case INQUIRY_KIND:
> +      if (!gfc_notify_std (GFC_STD_F2003, "KIND part_ref at %C"))
> +       return false;
> +      break;
> +
> +    case INQUIRY_LEN:
> +      if (!gfc_notify_std (GFC_STD_F2003, "LEN part_ref at %C"))
> +       return false;
> +      break;
> +
> +    default:
> +      gcc_unreachable ();
> +    }
> +

This is clearly better than the patch I submitted.
It it regression tests cleanly, feel free to commit
with appropriate testase(s).

Reply via email to