From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31999 invoked by alias); 22 Sep 2010 18:54:41 -0000 Received: (qmail 31909 invoked by uid 48); 22 Sep 2010 18:54:24 -0000 Date: Wed, 22 Sep 2010 18:54:00 -0000 Message-ID: <20100922185424.31908.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/45744] [4.6 Regression] ICE with -O1 in gfc_conv_expr_op, at fortran/trans-expr.c:1366 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "mikael at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-09/txt/msg02506.txt.bz2 ------- Comment #7 from mikael at gcc dot gnu dot org 2010-09-22 18:54 ------- (In reply to comment #6) > Tentative patch: > > Index: frontend-passes.c > =================================================================== > --- frontend-passes.c (Revision 164404) > +++ frontend-passes.c (Arbeitskopie) > @@ -122,8 +122,11 @@ > 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.isym > + && (e->value.function.isym->elemental > + || e->value.function.isym->ts.type != c->expr1->ts.type))) > { > > gfc_code *n; > I think the type comparison should take kinds into account too (REAL(4) vs REAL(8) for example). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45744