Skip float complex types if gdb_skip_float_test

Message ID 1475591646-9783-1-git-send-email-yao.qi@linaro.org
State New, archived
Headers

Commit Message

Yao Qi Oct. 4, 2016, 2:34 p.m. UTC
  If the target doesn't support float, we don't run float complex types
tests.

gdb/testsuite:

2016-10-04  Yao Qi  <yao.qi@linaro.org>

	* gdb.base/callfuncs.exp (do_function_calls): Do float
	complex tests if $skip_float_test is true.
---
 gdb/testsuite/gdb.base/callfuncs.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Pedro Alves Oct. 4, 2016, 6:48 p.m. UTC | #1
On 10/04/2016 03:34 PM, Yao Qi wrote:
> If the target doesn't support float, we don't run float complex types
> tests.

Shouldn't this be checked within support_complex_tests itself?
AFAIK, _Complex is always about floating point:

 http://en.cppreference.com/w/c/language/arithmetic_types#Complex_floating_types
 http://en.cppreference.com/w/cpp/numeric/complex

Thanks,
Pedro Alves
  

Patch

diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp
index b108952..55294f0 100644
--- a/gdb/testsuite/gdb.base/callfuncs.exp
+++ b/gdb/testsuite/gdb.base/callfuncs.exp
@@ -119,7 +119,7 @@  proc do_function_calls {} {
 	gdb_test "p t_int_double(99, 99.0)" " = 1"
     }
 
-    if [support_complex_tests] {
+    if { [support_complex_tests] && !$skip_float_test } {
 	gdb_test "p t_float_complex_values(fc1, fc2)" " = 1"
 	gdb_test "p t_float_complex_values(fc3, fc4)" " = 0"