This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/54881] [4.8 Regression] [OOP] ICE in fold_convert_loc, at fold-const.c:2016
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 10 Oct 2012 17:31:45 +0000
- Subject: [Bug fortran/54881] [4.8 Regression] [OOP] ICE in fold_convert_loc, at fold-const.c:2016
- Auto-submitted: auto-generated
- References: <bug-54881-4@http.gcc.gnu.org/bugzilla/>
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.