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



--- Comment #6 from janus at gcc dot gnu.org 2012-11-04 15:46:38 UTC ---

(In reply to comment #5)

> Here is an improved patch, which hopefully should be free of testsuite

> regressions (will re-check):



It is. However, I think there is a better way to fix this:





Index: gcc/fortran/primary.c

===================================================================

--- gcc/fortran/primary.c    (revision 193133)

+++ gcc/fortran/primary.c    (working copy)

@@ -1975,6 +1975,8 @@ gfc_match_varspec (gfc_expr *primary, int equiv_fl

       gcc_assert (primary->symtree->n.sym->attr.referenced);

       if (tbp_sym)

         primary->ts = tbp_sym->ts;

+      else

+        gfc_clear_ts (&primary->ts);



       m = gfc_match_actual_arglist (tbp->n.tb->subroutine,

                     &primary->value.compcall.actual);







This prevents the EXPR_COMPCALL from having the wrong typespec is the first

place (and resets it to BT_UNKNOWN instead).



I will commit this as obvious after regtesting.

Reply via email to