Skip float complex types if gdb_skip_float_test

Message ID 86wphmaox5.fsf@gmail.com
State New, archived
Headers

Commit Message

Yao Qi Oct. 5, 2016, 1:47 p.m. UTC
  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?
  

Comments

Pedro Alves Oct. 5, 2016, 2:07 p.m. UTC | #1
On 10/05/2016 02:47 PM, Yao Qi wrote:
> 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?
> 

LGTM.

Thanks,
Pedro Alves
  
Yao Qi Oct. 5, 2016, 4:06 p.m. UTC | #2
On Wed, Oct 5, 2016 at 3:07 PM, Pedro Alves <palves@redhat.com> wrote:
>
> LGTM.
>

Patch is pushed in.
  

Patch

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.