[Patch, Fortran] PR 58470: [4.9 Regression] [OOP] ICE on invalid with FINAL procedure and type extension
Janus Weil
janus@gcc.gnu.org
Fri Feb 7 18:52:00 GMT 2014
> But after all I think that the patch should not hurt. After giving it
> some second thoughts, the only alternative I could see is this:
>
> Index: gcc/fortran/resolve.c
> ===================================================================
> --- gcc/fortran/resolve.c (revision 207485)
> +++ gcc/fortran/resolve.c (working copy)
> @@ -11224,13 +11224,6 @@ gfc_resolve_finalizers (gfc_symbol* derived)
> gfc_finalizer* i;
> int my_rank;
>
> - /* Skip this finalizer if we already resolved it. */
> - if (list->proc_tree)
> - {
> - prev_link = &(list->next);
> - continue;
> - }
> -
> /* Check this exists and is a SUBROUTINE. */
> if (!list->proc_sym->attr.subroutine)
> {
>
>
> It also gets rid of the ICE, but I haven't regtested it yet. Does this
> look better to you than the original patch? (It might give duplicate
> error messages in some cases?)
Unfortunately this ICEs on a good number of finalize_* test cases ...
Cheers,
Janus
More information about the Gcc-patches
mailing list