From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32043 invoked by alias); 19 Apr 2010 18:48:52 -0000 Received: (qmail 31984 invoked by uid 48); 19 Apr 2010 18:48:42 -0000 Date: Mon, 19 Apr 2010 18:48:00 -0000 Message-ID: <20100419184842.31983.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/43227] [4.5/4.6 Regression] ICE: segmentation fault in mio_expr 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: 2010-04/txt/msg01880.txt.bz2 ------- Comment #18 from pault at gcc dot gnu dot org 2010-04-19 18:48 ------- (In reply to comment #16) I sort of doubt it. The problem arises because mio_symbol crashes in writing the character length of the procedure symbol: Breakpoint 1, mio_symbol (sym=0x9d02370) at ../../fortran-dev/gcc/fortran/module.c:3560 3560 mio_typespec (&sym->ts); (gdb) print sym->name $1 = 0xb7c8c9f0 "char1" (gdb) print sym->ts.u.cl $2 = (gfc_charlen *) 0x9d04400 (gdb) print *sym->ts.u.cl $3 = {length = 0x9d04420, next = 0x0, length_from_typespec = 0 '\0', backend_decl = 0x0, passed_length = 0x0, resolved = 0} (gdb) print *sym->ts.interface->ts.u.cl $4 = {length = 0x9d03000, next = 0x9cb6be8, length_from_typespec = 0 '\0', backend_decl = 0x0, passed_length = 0x0, resolved = 1} (gdb) Note that the interface character length has been resolved, whereas the procedure character length has not. This is why my patch of #7 works. I believe that the problem must lie in resolve.c. For some reason, the symbol's own character length expression is not being resolved. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43227