------- Comment #9 from tkoenig at gcc dot gnu dot org 2010-09-22 21:59 -------
This should be better:
Index: frontend-passes.c
===================================================================
--- frontend-passes.c (Revision 164404)
+++ frontend-passes.c (Arbeitskopie)
@@ -122,8 +122,13 @@
else if (seen_op && e->expr_type == EXPR_FUNCTION && e->rank > 0
&& ! (e->value.function.esym
&& (e->value.function.esym->attr.elemental
- || e->value.function.esym->attr.allocatable))
- && ! (e->value.function.isym && e->value.function.isym->elemental))
+ || e->value.function.esym->attr.allocatable
+ || e->value.function.esym->ts.type != c->expr1->ts.type
+ || e->value.function.esym->ts.kind != c->expr1->ts.kind))
+ && ! (e->value.function.isym
+ && (e->value.function.isym->elemental
+ || e->ts.type != c->expr1->ts.type
+ || e->ts.kind != c->expr1->ts.kind)))
{
gfc_code *n;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45744