From 4648e5880ea4bc32689612ccf586b0fb2c9c0884 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mon, 26 Nov 2012 18:13:24 +0000 Subject: [PATCH] gdb/testsuite/ * gdb.base/enumval.exp (print e, print f, print K): XFAIL on GCC <= 4.6. --- gdb/testsuite/ChangeLog | 4 +++ gdb/testsuite/gdb.base/enumval.exp | 48 ++++++++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index b625a7b8c21..cd7c7049917 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2012-11-26 Jan Kratochvil + + * gdb.base/enumval.exp (print e, print f, print K): XFAIL on GCC <= 4.6. + 2012-11-26 Joel Brobecker * gdb.base/empty_exe.exp: New testcase. diff --git a/gdb/testsuite/gdb.base/enumval.exp b/gdb/testsuite/gdb.base/enumval.exp index fa41096a3bd..cc1d11bbe80 100644 --- a/gdb/testsuite/gdb.base/enumval.exp +++ b/gdb/testsuite/gdb.base/enumval.exp @@ -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 " = \r\n$gdb_prompt $" { + if {[test_compiler_info {gcc-[0-3]-*}] + || [test_compiler_info {gcc-4-[0-6]-*}]} { + xfail $test + } else { + fail $test + } + } +} -- 2.30.2