[Openmp-commits] [openmp] [OpenMP] [test] Skip the -mlong-double-80 test on MSVC ABI (PR #81115)

Martin Storsjö via Openmp-commits openmp-commits at lists.llvm.org
Fri Feb 16 01:23:10 PST 2024


mstorsjo wrote:

> Might be better to check for 64-bit doubles in general since that's present on various targets. But probably not a huge deal overall.
> 
> This should do it
> 
> ```c
> #include <float.h>
> #if (LDBL_MANT_DIG == 53)
> // 64-bit double
> #elif (LDBL_MANT_DIG == 64)
> // 80-bit double
> #else
> // 128-bit double
> #endif
> ```

Hmm, so I kinda wonder how this test is supposed to work in the first place.

On the platforms where this test actually does work, the long doubles already are 80 bit from the start, so adding the `-mlong-double-80` option is essentially a no-op. And for other platforms, where long doubles aren't 80 bit, passing `-mlong-double-80` breaks the ABI between the calling code and libomp (libomp compiled as usual with whatever is the compiler default for long doubles), so I'm not really sure how that's meant to work at all.

Anyway, without taking on digging up what the point of this test was to begin with, are you ok with me merging this patch to hide the failure in MSVC build modes at least?

https://github.com/llvm/llvm-project/pull/81115


More information about the Openmp-commits mailing list