From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1016 invoked by alias); 4 Jul 2009 12:45:34 -0000 Received: (qmail 884 invoked by uid 48); 4 Jul 2009 12:45:14 -0000 Date: Sat, 04 Jul 2009 12:45:00 -0000 Message-ID: <20090704124514.883.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/40646] ICE assigning array return value from type-bound procedure In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus 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: 2009-07/txt/msg00333.txt.bz2 ------- Comment #3 from burnus at gcc dot gnu dot org 2009-07-04 12:45 ------- The problem is: gcc_assert (expr2->value.function.isym || (!comp && gfc_return_by_reference (expr2->value.function.esym) which assumes that "esym" is set. However, looking at resolve.c's resolve_compcall: e->value.function.esym = NULL; Daniel: Is there a special reason to set "esym" as NULL rather than using e->value.function.esym = e->value.compcall.tbp->u.specific->n.sym; One could also change the gcc_assert, however, I fear that the program assumes at several places that either isym or esym is set - even if it does not crash, it might cause problems if it is not available. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40646