This is the mail archive of the
archer-commits@sourceware.org
mailing list for the Archer project.
[SCM] archer-jankratochvil-fedora-merge: Fixup the merge with [archer-jankratochvil-fortran-module].
- From: jkratoch at sourceware dot org
- To: archer-commits at sourceware dot org
- Date: 8 Jun 2009 22:19:14 -0000
- Subject: [SCM] archer-jankratochvil-fedora-merge: Fixup the merge with [archer-jankratochvil-fortran-module].
The branch, archer-jankratochvil-fedora-merge has been updated
via 8d9ab68fc0955c9de6320bec2821a21e3244600d (commit)
via db41e11ae0a3aec7120ad6ce86450d838af74dd6 (commit)
from c2d5c4a39b10994d86d8f2f90dfed769e8f216f3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 8d9ab68fc0955c9de6320bec2821a21e3244600d
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat May 30 15:03:00 2009 +0200
Fixup the merge with [archer-jankratochvil-fortran-module].
No visible problem but the backport was wrong (incorrect placement of a patch
chunk).
commit db41e11ae0a3aec7120ad6ce86450d838af74dd6
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat May 30 14:59:48 2009 +0200
cherry-pick: Extend the testcase.
One easy misapplication of the fix could stay uncaught. The list of imported
modules did not get clear on the start of each function.
* gdb.fortran/module.exp (print var_i value 14): New test.
* gdb.fortran/module.f90: Import also `var_i', check it.
(module modmany): New variable `var_i'.
original commit: 3b8a75d71b7d9b7a961940729e7c05046d24d5f7
-----------------------------------------------------------------------
Summary of changes:
gdb/dwarf2read.c | 14 +++++++-------
gdb/testsuite/gdb.fortran/module.exp | 1 +
gdb/testsuite/gdb.fortran/module.f90 | 5 +++--
3 files changed, 11 insertions(+), 9 deletions(-)
First 500 lines of diff:
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 509bda1..b4720e8 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -3561,6 +3561,13 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
cu->list_in_scope = &local_symbols;
+ switch (cu->language)
+ {
+ case language_fortran:
+ cu->language_specific.fortran.use = NULL;
+ break;
+ }
+
child_die = die->child;
die_children = 0;
while (child_die && child_die->tag)
@@ -5364,13 +5371,6 @@ read_namespace (struct die_info *die, struct dwarf2_cu *cu)
}
}
- switch (cu->language)
- {
- case language_fortran:
- cu->language_specific.fortran.use = NULL;
- break;
- }
-
if (die->child != NULL)
{
struct die_info *child_die = die->child;
diff --git a/gdb/testsuite/gdb.fortran/module.exp b/gdb/testsuite/gdb.fortran/module.exp
index 5f078a3..c836c3c 100644
--- a/gdb/testsuite/gdb.fortran/module.exp
+++ b/gdb/testsuite/gdb.fortran/module.exp
@@ -42,3 +42,4 @@ gdb_test "print var_a" "No symbol \"var_a\" in current context\\."
gdb_test "print var_b" " = 11"
gdb_test "print var_c" "No symbol \"var_c\" in current context\\."
gdb_test "print var_d" " = 12"
+gdb_test "print var_i" " = 14" "print var_i value 14"
diff --git a/gdb/testsuite/gdb.fortran/module.f90 b/gdb/testsuite/gdb.fortran/module.f90
index 99013dd..118931d 100644
--- a/gdb/testsuite/gdb.fortran/module.f90
+++ b/gdb/testsuite/gdb.fortran/module.f90
@@ -22,7 +22,7 @@ module mod2
end module mod2
module modmany
- integer :: var_a = 10, var_b = 11, var_c = 12
+ integer :: var_a = 10, var_b = 11, var_c = 12, var_i = 14
end module modmany
subroutine sub1
@@ -37,12 +37,13 @@ end module modmany
var_i = var_i ! i-is-2
end
- use modmany, only: var_b, var_d => var_c
+ use modmany, only: var_b, var_d => var_c, var_i
call sub1
call sub2
if (var_b .ne. 11) call abort
if (var_d .ne. 12) call abort
+ if (var_i .ne. 14) call abort
var_b = var_b ! a-b-c-d
end
hooks/post-receive
--
Repository for Project Archer.