aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-07-02 12:08:44 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-07-02 12:08:44 +0000
commit46fc714c1b4ed78d97708bf570e713d0b9a02e8b (patch)
treedd2b5a0409cadc66e1bd6cc99ae8c8d17e9e448a
parent2113106124ff094741fc3a0edacf118739ce766d (diff)
downloadgdb-46fc714c1b4ed78d97708bf570e713d0b9a02e8b.zip
gdb-46fc714c1b4ed78d97708bf570e713d0b9a02e8b.tar.gz
gdb-46fc714c1b4ed78d97708bf570e713d0b9a02e8b.tar.bz2
gdb/testsuite/
* gdb.cp/m-static.exp: Call get_compiler_info. (static const int initialized nowhere): Call setup_xfail for gcc<=4.4.
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.cp/m-static.exp11
2 files changed, 16 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 7a37183..be20271 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-02 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * gdb.cp/m-static.exp: Call get_compiler_info.
+ (static const int initialized nowhere): Call setup_xfail for gcc<=4.4.
+
2011-07-01 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.cp/paren-type.cc: New files.
diff --git a/gdb/testsuite/gdb.cp/m-static.exp b/gdb/testsuite/gdb.cp/m-static.exp
index 9f060ac..2743f59 100644
--- a/gdb/testsuite/gdb.cp/m-static.exp
+++ b/gdb/testsuite/gdb.cp/m-static.exp
@@ -52,6 +52,10 @@ if { [gdb_compile "$objdir/$subdir/$objfile $objdir/$subdir/$objfile1" "${binfil
return -1
}
+if [get_compiler_info $binfile] {
+ return -1
+}
+
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
@@ -126,6 +130,13 @@ gdb_test "print test3.data.value_derived" "\\$\[0-9\].* = etruscan" "template ob
gdb_test "print test4.elsewhere" "\\$\[0-9\].* = 221" "static const int initialized elsewhere"
# static const int that nobody initializes. From PR gdb/635.
+if {[test_compiler_info {gcc-[0-3]-*}]
+ || [test_compiler_info {gcc-4-[0-4]-*}]} {
+ # There was an extra CU-level DW_TAG_variable as DW_AT_declaration
+ # with DW_AT_name = nowhere
+ # and DW_AT_MIPS_linkage_name = _ZN9gnu_obj_47nowhereE .
+ setup_xfail *-*-*
+}
gdb_test "print test4.nowhere" "field nowhere is nonexistent or has been optimized out" "static const int initialized nowhere"
# static const initialized in the class definition, PR gdb/11702.