if (type == bool_int_type_node) return "U6__booli";
if (type == bool_long_long_type_node) return "U6__boolx";
+ if (type == float128_type_node || type == float64x_type_node)
+ return NULL;
+
if (SCALAR_FLOAT_TYPE_P (type) && FLOAT128_IBM_P (TYPE_MODE (type)))
return "g";
- if (SCALAR_FLOAT_TYPE_P (type)
- && FLOAT128_IEEE_P (TYPE_MODE (type))
- /* _Float128 should mangle as DF128_ (done in generic code)
- rather than u9__ieee128 (used for __ieee128 and __float128). */
- && type != float128_type_node)
+ if (SCALAR_FLOAT_TYPE_P (type) && FLOAT128_IEEE_P (TYPE_MODE (type)))
return "u9__ieee128";
if (type == vector_pair_type_node)
--- /dev/null
+// P1467R9 - Extended floating-point types and standard names.
+// { dg-do compile { target c++23 } }
+// { dg-options "" }
+
+#include "ext-floating.h"
+
+#ifdef __STRICT_ANSI__
+#undef __SIZEOF_FLOAT128__
+#endif
+
+extern "C" void abort ();
+
+using namespace std;
+
+template <typename T, typename U>
+int
+foo (T x, U y) noexcept
+{
+ return 3;
+}
+
+int
+main ()
+{
+ if (foo (0.0f, 0.0f) != 3)
+ abort ();
+ if (foo (0.0, 0.0) != 3)
+ abort ();
+ if (foo (0.0L, 0.0L) != 3)
+ abort ();
+#ifdef __STDCPP_FLOAT16_T__
+ if (foo (0.0f16, 0.0f16) != 3)
+ abort ();
+ if (foo (0.0f, 0.0f16) != 3)
+ abort ();
+#endif
+#ifdef __STDCPP_FLOAT32_T__
+ if (foo (0.0f32, 0.0f32) != 3)
+ abort ();
+ if (foo (0.0f, 0.0f32) != 3)
+ abort ();
+#endif
+#ifdef __STDCPP_FLOAT64_T__
+ if (foo (0.0f64, 0.0f64) != 3)
+ abort ();
+ if (foo (0.0, 0.0f64) != 3)
+ abort ();
+#endif
+#ifdef __STDCPP_FLOAT128_T__
+ if (foo (0.0f128, 0.0f128) != 3)
+ abort ();
+ if (foo (0.0L, 0.0f128) != 3)
+ abort ();
+#endif
+#ifdef __STDCPP_BFLOAT16_T__
+ if (foo (0.0bf16, 0.0bf16) != 3)
+ abort ();
+ if (foo (0.0f, 0.0bf16) != 3)
+ abort ();
+#endif
+#ifdef __FLT32X_MANT_DIG__
+ if (foo (0.0f32x, 0.0f32x) != 3)
+ abort ();
+ if (foo (0.0, 0.0f32x) != 3)
+ abort ();
+#endif
+#ifdef __FLT64X_MANT_DIG__
+ if (foo (0.0f64x, 0.0f64x) != 3)
+ abort ();
+ if (foo (0.0L, 0.0f64x) != 3)
+ abort ();
+#endif
+#ifdef __FLT128X_MANT_DIG__
+ if (foo (0.0f128x, 0.0f128x) != 3)
+ abort ();
+ if (foo (0.0L, 0.0f128x) != 3)
+ abort ();
+#endif
+}