]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 26 Nov 2012 18:13:24 +0000 (18:13 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 26 Nov 2012 18:13:24 +0000 (18:13 +0000)
* gdb.base/enumval.exp (print e, print f, print K): XFAIL on GCC <= 4.6.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/enumval.exp

index b625a7b8c210e9a7b67b566d040d2182630ee5c3..cd7c70499178b78673574d045d9b017aff33ebd4 100644 (file)
@@ -1,3 +1,7 @@
+2012-11-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * gdb.base/enumval.exp (print e, print f, print K): XFAIL on GCC <= 4.6.
+
 2012-11-26  Joel Brobecker  <brobecker@adacore.com>
 
        * gdb.base/empty_exe.exp: New testcase.
index fa41096a3bd488d572784631de9006d3947b94ff..cc1d11bbe80e2ec6975483b007c7793f22e595c3 100644 (file)
@@ -24,8 +24,50 @@ if { [prepare_for_testing enumval.exp "enumval" "" {debug}] } {
 }
 
 # Check the real contents.
-gdb_test "print e" "= J"
-gdb_test "print f" "= K"
+
+set test "print e"
+gdb_test_multiple $test $test {
+    -re " = J\r\n$gdb_prompt $" {
+       pass $test
+    }
+    -re " = 4294967295\r\n$gdb_prompt $" {
+       if {[test_compiler_info {gcc-[0-3]-*}]
+           || [test_compiler_info {gcc-4-[0-6]-*}]} {
+           xfail $test
+       } else {
+           fail $test
+       }
+    }
+}
+
+set test "print f"
+gdb_test_multiple $test $test {
+    -re " = K\r\n$gdb_prompt $" {
+       pass $test
+    }
+    -re " = -1152921504606846976\r\n$gdb_prompt $" {
+       if {[test_compiler_info {gcc-[0-3]-*}]
+           || [test_compiler_info {gcc-4-[0-6]-*}]} {
+           xfail $test
+       } else {
+           fail $test
+       }
+    }
+}
 
 gdb_test "print J" "= J"
-gdb_test "print K" "= K"
+
+set test "print K"
+gdb_test_multiple $test $test {
+    -re " = K\r\n$gdb_prompt $" {
+       pass $test
+    }
+    -re " = <optimized out>\r\n$gdb_prompt $" {
+       if {[test_compiler_info {gcc-[0-3]-*}]
+           || [test_compiler_info {gcc-4-[0-6]-*}]} {
+           xfail $test
+       } else {
+           fail $test
+       }
+    }
+}