On Apr 28, 2024, "Kewen.Lin" <li...@linux.ibm.com> wrote:

> OK, from this perspective IMHO it seems more clear to adopt xfail
> with effective target long_double_64bit?

That's effective target is quite broken, alas.  I doubt it's used
anywhere: it calls an undefined proc, and its memcmp call seems to have
the size cut&pasto-ed from the 128-bit functions.  (a patchlet that
fixes these most glaring issues is below)

Furthermore, it doesn't really work.  Since it adds -mlong-double-64 for
the effective target test, it overrides the default, so it sort of
always passes, even on a 128-bit long double target.  But since the test
itself doesn't add that option, any xfails on long_double_64bit would be
flagged as XPASS.

There's no effective target test for 64-bit long double that doesn't
override the default, so we'd have to add one.  Alas, the natural name
for it is the one that's taken with overriding behavior, and the current
option-overriding tests, that need to be used along with the
corresponding add-options in testcases, might benefit from a renaming to
make them fit the already-established (?) naming standards.  Yuck.


diff --git a/gcc/testsuite/lib/target-supports.exp 
b/gcc/testsuite/lib/target-supports.exp
index 182d80129de9b..603da25c97d67 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -2961,12 +2961,12 @@ proc check_effective_target_long_double_64bit { } {
          /* eliminate removing volatile cast warning.  */
          a2 = a;
          b2 = b;
-         if (memcmp (&a2, &b2, 16) != 0)
+         if (memcmp (&a2, &b2, 8) != 0)
            return 1;
          sprintf (buffer, "%lg", b);
          return strcmp (buffer, "3") != 0;
        }
-    }  [add_options_for_ppc_long_double_override_64bit ""]]
+    }  [add_options_for_long_double_64bit ""]]
 }
 
 # Return the appropriate options to specify that long double uses the IEEE


-- 
Alexandre Oliva, happy hacker            https://FSFLA.org/blogs/lxo/
   Free Software Activist                   GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity
Excluding neuro-others for not behaving ""normal"" is *not* inclusive

Reply via email to