gdb/testsuite/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Sat, 2 Jul 2011 15:13:13 +0000 (15:13 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Sat, 2 Jul 2011 15:13:13 +0000 (15:13 +0000)
* gdb.cp/m-static.exp: Call get_compiler_info.
(static const int initialized nowhere): Call setup_xfail for gcc <= 4.4.
* gdb.cp/pr9167.exp (p b): Likewise.
* gdb.cp/temargs.exp: Do not set have_pr_45024_fixed for gcc 4.6.
(test value of P in inner_m, test type of Z in inner_m): Call
setup_xfail for gcc <= 4.5.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.cp/pr9167.exp
gdb/testsuite/gdb.cp/temargs.exp

index be20271..81673a1 100644 (file)
@@ -1,7 +1,11 @@
 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.
+       (static const int initialized nowhere): Call setup_xfail for gcc <= 4.4.
+       * gdb.cp/pr9167.exp (p b): Likewise.
+       * gdb.cp/temargs.exp: Do not set have_pr_45024_fixed for gcc 4.6.
+       (test value of P in inner_m, test type of Z in inner_m): Call
+       setup_xfail for gcc <= 4.5.
 
 2011-07-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
index 4487929..fc8476c 100644 (file)
@@ -32,5 +32,12 @@ if ![runto_main] then {
 gdb_breakpoint [gdb_get_line_number "marker"]
 gdb_continue_to_breakpoint "marker"
 
+if {[test_compiler_info {gcc-[0-3]-*}]
+    || [test_compiler_info {gcc-4-[0-4]-*}]} {
+    # There was an extra CU-level DW_TAG_variable for DEFAULT_INSTANCE
+    # as DW_AT_declaration with DW_AT_name = nowhere
+    # and DW_AT_MIPS_linkage_name = _ZN9gnu_obj_47nowhereE .
+    setup_xfail *-*-*
+}
 gdb_test "p b" "{<A<int, B>> = {<ATB<int>> = {data = 0}, static DEFAULT_INSTANCE = <optimized out>}, <No data fields>}"
 
index 74019bd..d094c5a 100644 (file)
@@ -51,8 +51,6 @@ if {[test_compiler_info {gcc-[0-3]-*}]
 } elseif {[test_compiler_info {gcc-4-5-*}]} {
     set have_pr_41736_fixed 0
     set have_pr_45024_fixed 0
-} elseif {[test_compiler_info {gcc-4-6-*}]} {
-    set have_pr_45024_fixed 0
 }
 
 set line [gdb_get_line_number "Breakpoint 1" $srcfile]
@@ -110,13 +108,23 @@ gdb_test "ptype T" "long" "test type of T in inner_m"
 if {!$have_pr_45024_fixed} { setup_xfail *-*-* }
 gdb_test "print I" " = 47" "test value of I in inner_m"
 
-if $have_older_template_gcc { setup_xfail "*-*-*" }
+if $have_older_template_gcc { setup_xfail "*-*-*"
+} elseif {[test_compiler_info {gcc-[0-3]-*}]
+        || [test_compiler_info {gcc-4-[0-5]-*}]} {
+  # gcc-4.5.x still does not emit inner DW_TAG_structure_type.
+  setup_xfail "*-*-*"
+}
 gdb_test "print P == &a_global" " = true" "test value of P in inner_m"
 
 if {!$have_pr_41736_fixed} { setup_xfail *-*-* }
 gdb_test "print MP" "&S::f" "test value of MP in inner_m"
 
-if $have_older_template_gcc { setup_xfail "*-*-*" }
+if $have_older_template_gcc { setup_xfail "*-*-*"
+} elseif {[test_compiler_info {gcc-[0-3]-*}]
+        || [test_compiler_info {gcc-4-[0-5]-*}]} {
+  # gcc-4.5.x still does not emit outer DW_TAG_structure_type.
+  setup_xfail "*-*-*"
+}
 gdb_test "whatis Z" "float" "test type of Z in inner_m"
 
 #