On 2025-01-28 17:12, Peter Bergner wrote:
On 1/28/25 11:43 AM, Siddhesh Poyarekar wrote:
+ return [check_runtime_nocache ppc_default_long_double_ibm {
+ ! Fortran
+ program default_long_double_ibm
+ integer, parameter :: kl = selected_real_kind (precision (0.0_8) + 1)
+ if (precision (0.0_kl) /= 31) then
+ call exit(1)
+ end if
+ end program default_long_double_ibm
+ }]
+}
I have no strong objection to the test case, but would it be easier to just
check for the existence of the __LONG_DOUBLE_IBM128__ predefined macro?
Ahh yes, that is much more compact and doesn't require me to stumble
around fortran(!), let me send an update.
I think this would also return true for a long double == double build
(ie, -mlong-double-64). Maybe we should instead have a positive test
ppc_default_long_double_ieee and xfail using ! ppc_default_long_double_ieee?
If we go the ppc_default_long_double_ieee route, you can check for the
existence of __LONG_DOUBLE_IEEE128__.
So the reason why I didn't go the __LONG_DOUBLE_IEEE128__ route because
the check would then have to be something like:
powerpc*-*-* && ! ppc_default_long_double_ieee
The reverse is just more compact since the triplet check just gets
folded into ppc_default_long_double_ibm.
Thanks,
Sid