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



--- Comment #6 from janus at gcc dot gnu.org 2012-10-10 17:31:45 UTC ---

(In reply to comment #4)

> 2) The error message in comment 3, which only happens with trunk (and 
> therefore

> is a regression).



This can be fixed by the following:



Index: gcc/fortran/match.c

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

--- gcc/fortran/match.c    (revision 192159)

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

@@ -5257,12 +5257,14 @@ select_class_set_tmp (gfc_typespec *ts)

   gfc_get_sym_tree (name, gfc_current_ns, &tmp, false);

   gfc_add_type (tmp->n.sym, ts, NULL);



-/* Copy across the array spec to the selector.  */

+  tmp->n.sym->attr.pointer

+        = CLASS_DATA (select_type_stack->selector)->attr.class_pointer;

+

+  /* Copy across the array spec to the selector.  */

   if (select_type_stack->selector->ts.type == BT_CLASS

       && (CLASS_DATA (select_type_stack->selector)->attr.dimension

       || CLASS_DATA (select_type_stack->selector)->attr.codimension))

     {

-      tmp->n.sym->attr.pointer = 1;

       tmp->n.sym->attr.dimension

         = CLASS_DATA (select_type_stack->selector)->attr.dimension;

       tmp->n.sym->attr.codimension







However, I really wonder what caused this regression. On a quick glance, the

only patch concerning SELECT TYPE on trunk was the commit for PR41600. And I

don't directly see how this would cause the regression.

Reply via email to