public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/24526] renamed variables from modules not visible in gdb Date: Thu, 23 Jun 2011 16:12:00 -0000 [thread overview] Message-ID: <bug-24526-4-7ej8FRbpq5@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-24526-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24526 Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org --- Comment #7 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-06-23 16:12:00 UTC --- My impression is that this is a bug in GDB and not in GCC (cf. readelf output below). For the following program, the result is: myvar is not found and gdb prints the wrong variable of the two "var33": Namely, the renamed one from "mod" and not the one of "mod2". Using "mod::var33" and "mod2::var33" works as expected. 14 print *, myvar (gdb) 33 15 print *, var33 (gdb) -42 16 end program test (gdb) p var33 $1 = 33 (gdb) p myvar No symbol "myvar" in current context. Test program: module mod integer :: var11 = 11, var22 = 22, var33 = 33 end module mod module mod2 integer :: var33 = -42 end module mod2 program test use mod, myvar => var33 use mod2 ! imports var33 == -42 implicit none print *, var11 ! prints: 11 print *, myvar ! prints: 33 print *, var33 ! prints: -42 end program test Readelf looks as follows: [ 12f] subprogram ... sibling (ref4) [ 1a5] [ 153] imported_module decl_file (data1) 1 decl_line (data1) 11 import (ref4) [ 1a5] [ 15a] imported_module decl_file (data1) 1 decl_line (data1) 10 import (ref4) [ 1cb] sibling (ref4) [ 171] [ 165] imported_declaration decl_file (data1) 1 decl_line (data1) 10 name (strp) "myvar" import (ref4) [ 1d6]
next prev parent reply other threads:[~2011-06-23 16:12 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-24526-4@http.gcc.gnu.org/bugzilla/> 2011-06-23 15:34 ` tkoenig at gcc dot gnu.org 2011-06-23 16:12 ` burnus at gcc dot gnu.org [this message] 2011-06-25 8:14 ` burnus at gcc dot gnu.org 2011-06-27 17:06 ` 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-24526-4-7ej8FRbpq5@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: linkBe 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).