From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12610 invoked by alias); 19 Apr 2007 19:47:13 -0000 Received: (qmail 12582 invoked by uid 48); 19 Apr 2007 19:47:02 -0000 Date: Thu, 19 Apr 2007 19:47:00 -0000 Message-ID: <20070419194702.12581.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/31610] ICE with transfer, merge in gfc_conv_expr_descriptor In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pault 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: 2007-04/txt/msg01482.txt.bz2 ------- Comment #2 from pault at gcc dot gnu dot org 2007-04-19 20:47 ------- (In reply to comment #1) This does the trick but I haven't checked against the standard, nor have I regtested. Paul Index: /svn/trunk/gcc/fortran/check.c =================================================================== *** /svn/trunk/gcc/fortran/check.c (revision 123643) --- /svn/trunk/gcc/fortran/check.c (working copy) *************** static try *** 218,224 **** same_type_check (gfc_expr *e, int n, gfc_expr *f, int m) { if (gfc_compare_types (&e->ts, &f->ts)) ! return SUCCESS; gfc_error ("'%s' argument of '%s' intrinsic at %L must be the same type " "and kind as '%s'", gfc_current_intrinsic_arg[m], --- 218,241 ---- same_type_check (gfc_expr *e, int n, gfc_expr *f, int m) { if (gfc_compare_types (&e->ts, &f->ts)) ! { ! if (e->ts.type != BT_CHARACTER) ! return SUCCESS; ! ! else if (e->ts.cl->length ! && e->ts.cl->length->expr_type == EXPR_CONSTANT ! && f->ts.cl->length ! && f->ts.cl->length->expr_type == EXPR_CONSTANT ! && mpz_cmp (e->ts.cl->length->value.integer, ! f->ts.cl->length->value.integer) != 0) ! { ! gfc_error ("'%s' argument of '%s' intrinsic at %L must have " ! "the same character length as '%s'", ! gfc_current_intrinsic_arg[m], gfc_current_intrinsic, ! &f->where, gfc_current_intrinsic_arg[n]); ! return FAILURE; ! } ! } gfc_error ("'%s' argument of '%s' intrinsic at %L must be the same type " "and kind as '%s'", gfc_current_intrinsic_arg[m], -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31610