This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Skip float complex types if gdb_skip_float_test
Pedro Alves <palves@redhat.com> writes:
> 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
Right, how about this?
--
Yao (齐尧)
From f1bd77431b64089bca8da891d221988a31e23d88 Mon Sep 17 00:00:00 2001
From: Yao Qi <yao.qi@linaro.org>
Date: Thu, 1 Sep 2016 15:36:54 +0100
Subject: [PATCH] Skip complex types tests if gdb_skip_float_test
If the target doesn't support float, we don't run float complex types
tests.
gdb/testsuite:
2016-10-05 Yao Qi <yao.qi@linaro.org>
* lib/gdb.exp (support_complex_tests): Return zero if
gdb_skip_float_test return true.
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 758db46..1230e77 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2176,6 +2176,13 @@ proc with_timeout_factor { factor body } {
# Return 1 if _Complex types are supported, otherwise, return 0.
gdb_caching_proc support_complex_tests {
+
+ if { [gdb_skip_float_test] } {
+ # If floating point is not supported, _Complex is not
+ # supported.
+ return 0
+ }
+
# Set up, compile, and execute a test program containing _Complex types.
# Include the current process ID in the file names to prevent conflicts
# with invocations for multiple testsuites.