This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/46809] [OOP] ICE with -fcheck=pointer for CLASS IS
- 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: Tue, 7 Dec 2010 20:33:48 +0000
- Subject: [Bug fortran/46809] [OOP] ICE with -fcheck=pointer for CLASS IS
- Auto-submitted: auto-generated
- References: <bug-46809-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46809
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2010.12.07 20:33:35
AssignedTo|unassigned at gcc dot |janus at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #5 from janus at gcc dot gnu.org 2010-12-07 20:33:35 UTC ---
(In reply to comment #4)
> The issue seems to be the EXTENDS_TYPE_OF call which is generated for CLASS IS;
> the call seems to have an "expr->where" defined - but not a
> where->lb->location.
We fail to set the location of the first argument when generating the
EXTENDS_TYPE_OF call. The following patch fixes it:
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c (revision 167369)
+++ gcc/fortran/resolve.c (working copy)
@@ -7892,6 +7892,7 @@ resolve_select_type (gfc_code *code, gfc_namespace
/* Set up arguments. */
new_st->expr1->value.function.actual = gfc_get_actual_arglist ();
new_st->expr1->value.function.actual->expr = gfc_get_variable_expr
(code->expr1->symtree);
+ new_st->expr1->value.function.actual->expr->where = code->loc;
gfc_add_vptr_component (new_st->expr1->value.function.actual->expr);
vtab = gfc_find_derived_vtab (body->ext.case_list->ts.u.derived);
st = gfc_find_symtree (vtab->ns->sym_root, vtab->name);