[PATCH] Fortran DW_TAG_module/DW_TAG_imported_{declaration,module} support, improved DW_TAG_common_block support

Tobias Burnus tobias.burnus@physik.fu-berlin.de
Thu Aug 21 19:30:00 GMT 2008


Hi Jakub,

> Attached is an updated patch (and interdiff from the last posted patch),
> which leaves this compatibility cruft only to C++ and lets Fortran
> define stuff inside of DW_TAG_module.

Thanks, the test case is now handled properly. However, I have found
that now module variables outside the only clause "ONLY:" do not work.

Assume the following module:
----------------------
module m
implicit none
real :: i,k,z
end module m
----------------------

(a) Then the following works now:
  use m, only: j=>i  ! and also: "only: i" w/o renaming
  integer(8) :: i    ! or "only: j=>i, z=>i" work
  j = 5.0
  i = 7

(b) However, the following does not:
  use m
  i = 5.0
  k = 10.0
  z = 19.0
  print *, i, k, z

[...]
(idb) next
12      z = 19.0
(idb) pt i
No symbol "i" in current context.
(idb) pt j
No symbol "j" in current context.
(idb) pt z
No symbol "z" in current context.

c) Analogously for the following where not even the renamed symbol is
visible:

Breakpoint 1, MAIN_ () at /dev/shm/a.f90:7
7       use m, j=>i
(idb) next
10      j = 5.0
(idb) next
13      print *, j
(idb) pt j
No symbol "j" in current context.
(idb) pt i       <<<< This is OK!
No symbol "i" in current context.
(idb)


Tobias



More information about the Gcc-patches mailing list