From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7573 invoked by alias); 29 Dec 2012 00:26:00 -0000 Received: (qmail 7465 invoked by uid 55); 29 Dec 2012 00:25:36 -0000 From: "sgk at troutmask dot apl.washington.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/55827] ICE with multiple fortran modules and character lenght determined by an interfaced pure function Date: Sat, 29 Dec 2012 00:26:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sgk at troutmask dot apl.washington.edu X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2012-12/txt/msg02413.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55827 --- Comment #4 from Steve Kargl 2012-12-29 00:25:33 UTC --- On Fri, Dec 28, 2012 at 10:41:22PM +0000, mikael at gcc dot gnu.org wrote: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55827 > > Mikael Morin changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > CC| |mikael at gcc dot gnu.org > > --- Comment #3 from Mikael Morin 2012-12-28 22:41:22 UTC --- > (In reply to comment #2) > > Here's a possible patch against trunk. > > Hum, it doesn't look right to allow unnamed (symtree == NULL) functions. > Here is another possible patch. Basically untested. > Hi Mikael, I tested your patch. While it fixes the issue in this PR, it causes a regression with used_dummy_types_7.f90. I haven't tried to traced down the problem other than a quick gdb session. Program received signal SIGSEGV, Segmentation fault. 0x0000000000532112 in gfc_insert_bbt (root=0x0, new_node=0x202806cd0, compare=0x5c2a70 ) at ../../gcc4x/gcc/fortran/bbt.c:138 138 *r = insert (n, *r, compare); (gdb) bt #0 0x0000000000532112 in gfc_insert_bbt (root=0x0, new_node=0x202806cd0, compare=0x5c2a70 ) at ../../gcc4x/gcc/fortran/bbt.c:138 #1 0x00000000005c52fa in gfc_new_symtree (root=root@entry=0x0, name=name@entry=0x7fffffffcd80 "@5") at ../../gcc4x/gcc/fortran/symbol.c:2403 #2 0x00000000005c53e1 in gfc_get_unique_symtree (ns=0x0) at ../../gcc4x/gcc/fortran/symbol.c:2455 #3 0x0000000000585de7 in read_cleanup (p=0x202898700) at ../../gcc4x/gcc/fortran/module.c:4461 #4 0x0000000000585d8e in read_cleanup (p=0x202898680) at ../../gcc4x/gcc/fortran/module.c:4450 #5 0x0000000000585d85 in read_cleanup (p=0x202898780) at ../../gcc4x/gcc/fortran/module.c:4449 #6 0x000000000058b894 in read_module () at ../../gcc4x/gcc/fortran/module.c:4821 #7 0x000000000058bd15 in gfc_use_module (module=module@entry=0x202806970) at ../../gcc4x/gcc/fortran/module.c:6249 #8 0x000000000058ce19 in gfc_use_modules () at ../../gcc4x/gcc/fortran/module.c:6372 #9 0x0000000000591bb8 in use_modules () at ../../gcc4x/gcc/fortran/parse.c:88 #10 0x0000000000592b95 in decode_statement () at ../../gcc4x/gcc/fortran/parse.c:302 #11 0x0000000000593e95 in next_free () at ../../gcc4x/gcc/fortran/parse.c:779 #12 next_statement () at ../../gcc4x/gcc/fortran/parse.c:972 #13 0x0000000000594d4e in parse_spec (st=, st@entry=ST_NONE) at ../../gcc4x/gcc/fortran/parse.c:2740 #14 0x00000000005952ab in parse_interface () at ../../gcc4x/gcc/fortran/parse.c:2461 #15 parse_spec (st=ST_INTERFACE, st@entry=ST_NONE) at ../../gcc4x/gcc/fortran/parse.c:2698 #16 0x0000000000597b6d in parse_module () at ../../gcc4x/gcc/fortran/parse.c:4307 #17 gfc_parse_file () at ../../gcc4x/gcc/fortran/parse.c:4584 #18 0x00000000005d2e86 in gfc_be_parse_file () at ../../gcc4x/gcc/fortran/f95-lang.c:191 #19 0x000000000097db06 in compile_file () at ../../gcc4x/gcc/toplev.c:545 #20 0x000000000097f8ad in do_compile () at ../../gcc4x/gcc/toplev.c:1878 #21 toplev_main (argc=2, argv=0x7fffffffd4f0) at ../../gcc4x/gcc/toplev.c:1954 #22 0x000000000052b60f in _start ()