diff mbox

[Fortran,4.7,Regression] PR 59941: ICE with polymorphic types

Message ID CAKwh3qjQVvbBefEd5CWZt_eCHZRDBHgTF3eTjKCQb3rFPmmroQ@mail.gmail.com
State New
Headers show

Commit Message

Janus Weil Feb. 2, 2014, 8:31 p.m. UTC
Hi all,

the attached patch fixes an OOP-related 4.7-only regression. Pretty
much straightforward, for details see PR.

Regtested on x86_64-unknown-linux-gnu. Ok for 4.7?

Cheers,
Janus



2014-02-02  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/59941
    * expr.c (replace_comp): Check for isym to avoid ICE.

2014-02-02  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/59941
    * gfortran.dg/typebound_proc_26.f90: New.

Comments

Mikael Morin Feb. 2, 2014, 8:51 p.m. UTC | #1
Le 02/02/2014 21:31, Janus Weil a écrit :
> Hi all,
> 
> the attached patch fixes an OOP-related 4.7-only regression. Pretty
> much straightforward, for details see PR.
> 
> Regtested on x86_64-unknown-linux-gnu. Ok for 4.7?
> 
Yes, thanks.

Mikael
Janus Weil Feb. 3, 2014, 8:17 a.m. UTC | #2
>> the attached patch fixes an OOP-related 4.7-only regression. Pretty
>> much straightforward, for details see PR.
>>
>> Regtested on x86_64-unknown-linux-gnu. Ok for 4.7?
>>
> Yes, thanks.

Thanks, Mikael. Committed as r207417.

Cheers,
Janus
diff mbox

Patch

Index: gcc/fortran/expr.c
===================================================================
--- gcc/fortran/expr.c	(revision 207395)
+++ gcc/fortran/expr.c	(working copy)
@@ -4195,7 +4195,7 @@  replace_comp (gfc_expr *expr, gfc_symbol *sym, int
   gfc_component *comp;
   comp = (gfc_component *)sym;
   if ((expr->expr_type == EXPR_VARIABLE 
-       || (expr->expr_type == EXPR_FUNCTION
+       || (expr->expr_type == EXPR_FUNCTION && !expr->value.function.isym
 	   && !gfc_is_intrinsic (expr->symtree->n.sym, 0, expr->where)))
       && expr->symtree->n.sym->ns == comp->ts.interface->formal_ns)
     {