* [PATCH] Skip float complex types if gdb_skip_float_test
@ 2016-10-04 14:34 Yao Qi
2016-10-04 18:49 ` Pedro Alves
0 siblings, 1 reply; 5+ messages in thread
From: Yao Qi @ 2016-10-04 14:34 UTC (permalink / raw)
To: gdb-patches
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(-)
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"
--
1.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Skip float complex types if gdb_skip_float_test
2016-10-04 14:34 [PATCH] Skip float complex types if gdb_skip_float_test Yao Qi
@ 2016-10-04 18:49 ` Pedro Alves
2016-10-05 13:47 ` Yao Qi
0 siblings, 1 reply; 5+ messages in thread
From: Pedro Alves @ 2016-10-04 18:49 UTC (permalink / raw)
To: Yao Qi, gdb-patches
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Skip float complex types if gdb_skip_float_test
2016-10-04 18:49 ` Pedro Alves
@ 2016-10-05 13:47 ` Yao Qi
2016-10-05 14:07 ` Pedro Alves
0 siblings, 1 reply; 5+ messages in thread
From: Yao Qi @ 2016-10-05 13:47 UTC (permalink / raw)
To: Pedro Alves; +Cc: Yao Qi, gdb-patches
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-10-05 16:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-04 14:34 [PATCH] Skip float complex types if gdb_skip_float_test Yao Qi
2016-10-04 18:49 ` Pedro Alves
2016-10-05 13:47 ` Yao Qi
2016-10-05 14:07 ` Pedro Alves
2016-10-05 16:06 ` Yao Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).