This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR fortran/82934,83318 -- Enforce F2008:C631
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- Cc: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 9 Dec 2017 08:21:10 -0800
- Subject: Re: [PATCH] PR fortran/82934,83318 -- Enforce F2008:C631
- Authentication-results: sourceware.org; auth=none
- References: <20171209011328.GA42376@troutmask.apl.washington.edu> <CAGkQGiLxXk91SYV=pX4-Lpk8CSq6ztRKMdr1BMZ2oFA8eLLcww@mail.gmail.com>
- Reply-to: sgk at troutmask dot apl dot washington dot edu
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