This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/53478] gfortran segfaults when module name clashes with C binding name of procedure


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53478

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-05-24
                 CC|                            |kargl at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from kargl at gcc dot gnu.org 2012-05-24 17:23:50 UTC ---
Confirmed.
(gdb) bt
#0  0x0000000202c0103c in strcmp () from /lib/libc.so.7
#1  0x000000000050aa91 in gfc_verify_binding_labels (sym=0x203cd1280)
    at ../../gcc4x/gcc/fortran/resolve.c:9847
#2  0x000000000052cf40 in do_traverse_symtree (st=0x203c183a0, st_func=0, 
    sym_func=0x50a840 <gfc_verify_binding_labels>)
    at ../../gcc4x/gcc/fortran/symbol.c:3386
#3  0x000000000051c030 in resolve_types (ns=0x203c63600)
    at ../../gcc4x/gcc/fortran/resolve.c:13984
#4  0x000000000051bef8 in resolve_types (ns=0x203c62c00)
    at ../../gcc4x/gcc/fortran/resolve.c:13965
#5  0x000000000050feec in gfc_resolve (ns=0xfffffffffffffff8)
    at ../../gcc4x/gcc/fortran/resolve.c:14054
#6  0x0000000000502a48 in gfc_parse_file ()
    at ../../gcc4x/gcc/fortran/parse.c:4594
#7  0x000000000053c90e in gfc_be_parse_file ()
    at ../../gcc4x/gcc/fortran/f95-lang.c:191
#8  0x00000000008f57f0 in compile_file () at ../../gcc4x/gcc/toplev.c:552
#9  do_compile () at ../../gcc4x/gcc/toplev.c:1874
#10 0x00000000008f5e4c in toplev_main (argc=2, argv=0x7fffffffd4e0)
    at ../../gcc4x/gcc/toplev.c:1950
#11 0x0000000000499a6d in _start ()
(gdb) up 1
#1  0x000000000050aa91 in gfc_verify_binding_labels (sym=0x203cd1280)
    at ../../gcc4x/gcc/fortran/resolve.c:9847
9847              if (sym->attr.if_source == IFSRC_DECL 
(gdb) list
9842
9843          bind_c_sym = gfc_find_gsymbol (gfc_gsym_root,
sym->binding_label);
9844          if (bind_c_sym != NULL 
9845              && strcmp (bind_c_sym->name, sym->binding_label) == 0)
9846            {
9847              if (sym->attr.if_source == IFSRC_DECL 
9848                  && (bind_c_sym->type != GSYM_SUBROUTINE 
9849                      && bind_c_sym->type != GSYM_FUNCTION) 
9850                  && ((sym->attr.contained == 1 
9851                       && strcmp (bind_c_sym->sym_name, sym->name) != 0) 
(gdb) print *bind_c_sym
$1 = {priority = 41101, left = 0x0, right = 0x0, name = 0x20400bf80 "exports", 
  sym_name = 0x0, mod_name = 0x0, binding_label = 0x0, type = GSYM_MODULE, 
  defined = 1, used = 0, where = {nextc = 0x203ca61f8, lb = 0x203ca61a0}, 
  ns = 0x203c62c00}

Note, sym->binding_label is 0x0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]