http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55827
--- Comment #4 from Steve Kargl <sgk at troutmask dot apl.washington.edu> 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 <mikael at gcc dot gnu.org> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > CC| |mikael at gcc dot gnu.org > > --- Comment #3 from Mikael Morin <mikael at gcc dot gnu.org> 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 <compare_symtree(void*, void*)>) 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 <compare_symtree(void*, void*)>) 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=<optimized out>, 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 ()