https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119408

--- Comment #16 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
(In reply to chenglulu from comment #15)
> (In reply to Xi Ruoyao from comment #14)
> > (In reply to chenglulu from comment #13)
> > > There is a problem now. When gcc supports both _Float128 and Q suffixes, 
> > > the
> > > libquadmath library will be automatically linked when the fortran program 
> > > is
> > > compiled using gfortran compiled with this version of gcc code. However, 
> > > the
> > > current LoongArch does not support this library.
> > 
> > This library should only be supported when long double is **not** 128-bit. 
> > See why PR96016 was closed as INVALID.
> 
> So is the right thing for us to do is to remove support for these two?

Maybe just

diff --git a/libgfortran/acinclude.m4 b/libgfortran/acinclude.m4
index a73207e5465..8913dacb2b1 100644
--- a/libgfortran/acinclude.m4
+++ b/libgfortran/acinclude.m4
@@ -274,6 +274,9 @@ AC_DEFUN([LIBGFOR_CHECK_FLOAT128], [
   AC_CACHE_CHECK([whether we have a usable _Float128 type],
                  libgfor_cv_have_float128, [
    GCC_TRY_COMPILE_OR_LINK([
+#ifdef __loongarch__
+#error On LoongArch we should use long double instead; _Float128 is only for
backward compatibility
+#endif
     _Float128 foo (_Float128 x)
     {
      _Complex _Float128 z1, z2;

(and regenerate libgfortran/configure of course)?

Reply via email to