summaryrefslogtreecommitdiff
path: root/numpy/core/check_longdouble.c
diff options
context:
space:
mode:
authorRalf Gommers <ralf.gommers@gmail.com>2022-11-27 14:51:32 +0100
committerGitHub <noreply@github.com>2022-11-27 14:51:32 +0100
commit3b7672ebd16982b661b8fbcabac80158662a8784 (patch)
treeafc7f0eaad71d8f54f4f03a44da407fb222e997f /numpy/core/check_longdouble.c
parentd4b2d4f80060285ac085ea874aceaf9fa1bfb757 (diff)
parent4002a7d421ff10780c28a3643683af7a9754f87f (diff)
downloadnumpy-3b7672ebd16982b661b8fbcabac80158662a8784.tar.gz
Merge pull request #22663 from rgommers/build-with-meson
BLD: enable building NumPy with Meson [ci skip]
Diffstat (limited to 'numpy/core/check_longdouble.c')
-rw-r--r--numpy/core/check_longdouble.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/numpy/core/check_longdouble.c b/numpy/core/check_longdouble.c
new file mode 100644
index 000000000..756ef3fc6
--- /dev/null
+++ b/numpy/core/check_longdouble.c
@@ -0,0 +1,15 @@
+/* "before" is 16 bytes to ensure there's no padding between it and "x".
+ * We're not expecting any "long double" bigger than 16 bytes or with
+ * alignment requirements stricter than 16 bytes. */
+typedef long double test_type;
+
+struct {
+ char before[16];
+ test_type x;
+ char after[8];
+} foo = {
+ { '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
+ '\001', '\043', '\105', '\147', '\211', '\253', '\315', '\357' },
+ -123456789.0,
+ { '\376', '\334', '\272', '\230', '\166', '\124', '\062', '\020' }
+};