From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4086 invoked by alias); 7 Nov 2007 14:40:02 -0000 Received: (qmail 3892 invoked by uid 48); 7 Nov 2007 14:39:48 -0000 Date: Wed, 07 Nov 2007 14:40:00 -0000 Message-ID: <20071107143948.3891.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/34008] ICE in gfc_trans_call, at fortran/trans-stmt.c:389 on elemental assignment 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-11/txt/msg00587.txt.bz2 ------- Comment #2 from pault at gcc dot gnu dot org 2007-11-07 14:39 ------- According to 12.3.2.1.2 Defined assignments If ASSIGNMENT is specified in an INTERFACE statement, all the procedures in the interface block shall be subroutines that may be referenced as defined assignments (7.5.1.3). Each of these subroutines shall have exactly two dummy arguments. Each argument shall be nonoptional. The first argument shall have INTENT (OUT) or INTENT (INOUT)......... gfortran is asserting INTENT (OUT) and not allowing INOUT. I'll fix it this weekend. Paul PS This is the fix: Index: /svn/trunk/gcc/fortran/trans-stmt.c =================================================================== *** /svn/trunk/gcc/fortran/trans-stmt.c (revision 129882) --- /svn/trunk/gcc/fortran/trans-stmt.c (working copy) *************** gfc_trans_call (gfc_code * code, bool de *** 386,392 **** { gfc_symbol *sym; sym = code->resolved_sym; ! gcc_assert (sym->formal->sym->attr.intent == INTENT_OUT); gcc_assert (sym->formal->next->sym->attr.intent == INTENT_IN); gfc_conv_elemental_dependencies (&se, &loopse, sym, code->ext.actual); --- 386,393 ---- { gfc_symbol *sym; sym = code->resolved_sym; ! gcc_assert (sym->formal->sym->attr.intent == INTENT_OUT ! || sym->formal->sym->attr.intent == INTENT_INOUT); gcc_assert (sym->formal->next->sym->attr.intent == INTENT_IN); gfc_conv_elemental_dependencies (&se, &loopse, sym, code->ext.actual); It might be better to remove the assertions and replace them with errors in resolve.c -- pault at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org |dot org | Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2007-11-07 14:39:48 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34008