public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kargl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/53478] gfortran segfaults when module name clashes with C binding name of procedure
Date: Thu, 24 May 2012 17:45:00 -0000	[thread overview]
Message-ID: <bug-53478-4-Xtiyzt7ATQ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-53478-4@http.gcc.gnu.org/bugzilla/>

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


  reply	other threads:[~2012-05-24 17:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24 17:08 [Bug fortran/53478] New: " solomon.gibbs.lists at gmail dot com
2012-05-24 17:45 ` kargl at gcc dot gnu.org [this message]
2012-05-24 18:06 ` [Bug fortran/53478] " sgk at troutmask dot apl.washington.edu
2012-05-24 18:53 ` sgk at troutmask dot apl.washington.edu
2012-06-25 12:06 ` dominiq at lps dot ens.fr
2013-04-15 10:06 ` aron at ahmadia dot net
2013-04-15 11:01 ` burnus at gcc dot gnu.org
2013-05-20 20:14 ` burnus at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-53478-4-Xtiyzt7ATQ@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).