This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR fortran/82934,83318 -- Enforce F2008:C631


On Sat, Dec 09, 2017 at 09:09:14AM +0000, Paul Richard Thomas wrote:
> 
> This is good for trunk with one proviso:
> 
> This should mutate from:
> -  /* TODO understand why this error does not appear but, instead,
> -     the derived type is caught as a variable in primary.c.  */
> -  if (gfc_spec_list_type (type_param_spec_list, NULL) != SPEC_EXPLICIT)
>      {
> -      gfc_error ("The type parameter spec list in the type-spec at "
> - "%L cannot contain ASSUMED or DEFERRED parameters",
> - &old_locus);
> -      goto cleanup;
> 
> to (ignoring lhs white space and tabs):
>    if (type_param_spec_list
>        && gfc_spec_list_type (type_param_spec_list, NULL) == SPEC_DEFERRED)
>       {
>          gfc_error ("The type parameter spec list in the type-spec at "
>                         %L cannot contain DEFERRED parameters", &old_locus);
>          goto cleanup;
>       }
> 
> which retains the appropriate error for PDTs.
> 

OK.  Do you have a test that triggers this error
sitting in your next round of PDT changes?  My
regression testing did not bulk at the removal
of the code.

BTW, is this code correct?

bool
gfc_insert_parameter_exprs (gfc_expr *e, gfc_actual_arglist *param_list)
{
  gfc_actual_arglist *old_param_spec_list = type_param_spec_list;
  type_param_spec_list = param_list;
  return gfc_traverse_expr (e, NULL, &insert_parameter_exprs, 1);
  type_param_spec_list = NULL;
  type_param_spec_list = old_param_spec_list;
}

The last 2 line are never reached?

-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]