1feee8
commit c5c666f34939d4bbf73aac8b753ab39621ebf33c
1feee8
Author: H.J. Lu <hjl.tools@gmail.com>
1feee8
Date:   Mon Dec 20 14:37:26 2021 -0800
1feee8
1feee8
    s_sincosf.h: Change pio4 type to float [BZ #28713]
1feee8
    
1feee8
    s_cosf.c and s_sinf.c have
1feee8
    
1feee8
      if (abstop12 (y) < abstop12 (pio4))
1feee8
    
1feee8
    where abstop12 takes a float argument, but pio4 is static const double.
1feee8
    pio4 is used only in calls to abstop12 and never in arithmetic.  Apply
1feee8
    
1feee8
    -static const double pio4 = 0x1.921FB54442D18p-1;
1feee8
    +static const float pio4 = 0x1.921FB6p-1f;
1feee8
    
1feee8
    to fix:
1feee8
    
1feee8
    FAIL: math/test-float-cos
1feee8
    FAIL: math/test-float-sin
1feee8
    FAIL: math/test-float-sincos
1feee8
    FAIL: math/test-float32-cos
1feee8
    FAIL: math/test-float32-sin
1feee8
    FAIL: math/test-float32-sincos
1feee8
    
1feee8
    when compiling with GCC 12.
1feee8
    
1feee8
    Reviewed-by: Paul Zimmermann <Paul.Zimmermann@inria.fr>
1feee8
    (cherry picked from commit d3e4f5a1014db09ff1c62c6506f92cba469e193d)
1feee8
1feee8
diff --git a/sysdeps/ieee754/flt-32/s_sincosf.h b/sysdeps/ieee754/flt-32/s_sincosf.h
1feee8
index 125ab7f846c463c6..372d8542c2c9a9c7 100644
1feee8
--- a/sysdeps/ieee754/flt-32/s_sincosf.h
1feee8
+++ b/sysdeps/ieee754/flt-32/s_sincosf.h
1feee8
@@ -24,7 +24,7 @@
1feee8
 /* 2PI * 2^-64.  */
1feee8
 static const double pi63 = 0x1.921FB54442D18p-62;
1feee8
 /* PI / 4.  */
1feee8
-static const double pio4 = 0x1.921FB54442D18p-1;
1feee8
+static const float pio4 = 0x1.921FB6p-1f;
1feee8
 
1feee8
 /* Polynomial data (the cosine polynomial is negated in the 2nd entry).  */
1feee8
 extern const sincos_t __sincosf_table[2] attribute_hidden;