ice in gfc_insert_bbt
Daniel Franke
franke.daniel@gmail.com
Mon Feb 12 19:33:00 GMT 2007
On Monday 12 February 2007 17:38:17 you wrote:
> Daniel,
>
> This is indeed my doing - are you able to pin-point the code that
> causes it and to give me a bit of sample code? I can see from the
> backtrace that you have triggered a condition that I tried very hard
> to generate, whilst developing the patch:)
Here's a testcase, probably not minimal but already quite short:
$> cat ice.f90
MODULE class_dummy_atom_types
TYPE :: dummy_atom_list
TYPE(dummy_atom), DIMENSION(:), POINTER :: table => null()
END TYPE
TYPE :: dummy_atom
TYPE(dummy_atom_private), POINTER :: p => null()
END TYPE
TYPE :: dummy_atom_private
INTEGER :: id
END TYPE
END MODULE
MODULE class_dummy_atom
USE class_dummy_atom_types, ONLY: dummy_atom
INTERFACE
SUBROUTINE dummy_atom_insert_symmetry_mate(this, other)
USE class_dummy_atom_types, ONLY: dummy_atom
TYPE(dummy_atom), INTENT(inout) :: this
TYPE(dummy_atom), INTENT(in) :: other
END SUBROUTINE
END INTERFACE
END MODULE
MODULE class_dummy_atom_list
INTERFACE
SUBROUTINE dummy_atom_list_insert(this, atom)
USE class_dummy_atom_types, ONLY: dummy_atom_list
USE class_dummy_atom, ONLY: dummy_atom
TYPE(dummy_atom_list), INTENT(inout) :: this
TYPE(dummy_atom), INTENT(in) :: atom
END SUBROUTINE
END INTERFACE
END MODULE
$> gdb /[...]/4.3.0/f951
run -g -Wall ice.f90
Starting program: /[...]/4.3.0/f951 -g -Wall ice.f90
Program received signal SIGSEGV, Segmentation fault.
gfc_insert_bbt (root=0x0, new=0x87e4190, compare=0x80a1f60 <compare_symtree>)
at bbt.c:137
137 *r = insert (n, *r, compare);
(gdb) bt
#0 gfc_insert_bbt (root=0x0, new=0x87e4190, compare=0x80a1f60
<compare_symtree>) at bbt.c:137
#1 0x080a1dc9 in gfc_new_symtree (root=0x0, name=0xbfbad8b4 "@5") at
symbol.c:1909
#2 0x08081dcf in get_unique_symtree (ns=0x0) at module.c:1775
#3 0x08084111 in read_cleanup (p=0x87e4370) at module.c:3290
#4 0x080840ca in read_cleanup (p=0x87e3e18) at module.c:3284
#5 0x080840c2 in read_cleanup (p=0x87e4438) at module.c:3283
#6 0x080849a5 in gfc_use_module () at module.c:3563
#7 0x0808a70e in accept_statement (st=142492048) at parse.c:1255
#8 0x0808a955 in parse_spec (st=ST_USE) at parse.c:1887
#9 0x0808ac2c in parse_spec (st=ST_INTERFACE) at parse.c:1782
#10 0x0808c066 in gfc_parse_file () at parse.c:3063
#11 0x080abb5d in gfc_be_parse_file (set_yydebug=0) at f95-lang.c:307
#12 0x082cc43d in toplev_main (argc=4, argv=0xbfbade44) at toplev.c:1021
#13 0x080ec72f in main (argc=Cannot access memory at address 0x7e0e
) at main.c:35
Will test your patch now ...
Daniel
More information about the Fortran
mailing list