public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/15208] New: Accessing a variable passed to a subroutine after an inferior call is not possible
@ 2013-02-27  9:49 keven.boell at intel dot com
  2013-02-27  9:50 ` [Bug fortran/15208] " keven.boell at intel dot com
  0 siblings, 1 reply; 2+ messages in thread
From: keven.boell at intel dot com @ 2013-02-27  9:49 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15208

             Bug #: 15208
           Summary: Accessing a variable passed to a subroutine after an
                    inferior call is not possible
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned@sourceware.org
        ReportedBy: keven.boell@intel.com
    Classification: Unclassified


Created attachment 6905
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6905
reproducer/dejagnu test in a single patch

When trying to call a subroutine which has a parameter, using an inferior call,
GDB is not able to read the variable correctly. Instead a "error reading
variable: Cannot access memory at address" message is shown.

The simple test program [1] below was compiled using gfortran 4.6.3 with -g.
Additionally you'll find a simple dejagnu test as a single patch attached,
which reproduces the issue.

After starting the program in GDB, the user may try to call the subroutine
"sub" using an inferior call and pass a value to it. At the variable read (w =
v) a SIGSEGV will be reported to the user:

(gdb) call sub(42)
Program received signal SIGSEGV, Segmentation fault.
0x00000000004005d0 in s2 (v=<error reading variable: Cannot access memory at
address 0x2a>) at ic.f90:5


[1] Simple test program:
--
subroutine sub (v)
    implicit none
    INTEGER, intent(in) :: v
    INTEGER :: w
    w = v
    return
END subroutine

PROGRAM inferior
    implicit none

    CALL sub(5)
END PROGRAM inferior

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug fortran/15208] Accessing a variable passed to a subroutine after an inferior call is not possible
  2013-02-27  9:49 [Bug fortran/15208] New: Accessing a variable passed to a subroutine after an inferior call is not possible keven.boell at intel dot com
@ 2013-02-27  9:50 ` keven.boell at intel dot com
  0 siblings, 0 replies; 2+ messages in thread
From: keven.boell at intel dot com @ 2013-02-27  9:50 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15208

kboell <keven.boell at intel dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |keven.boell at intel dot
                   |                            |com, sanimir.agovic at
                   |                            |intel dot com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-27  9:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-27  9:49 [Bug fortran/15208] New: Accessing a variable passed to a subroutine after an inferior call is not possible keven.boell at intel dot com
2013-02-27  9:50 ` [Bug fortran/15208] " keven.boell at intel dot com

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).