aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-07-31 04:37:40 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2013-07-31 04:37:40 +0300
commite13f8136268124b5591c8151130137599d313153 (patch)
tree26d92a877c702b6015e85fcfe9cf84ceb24b9f52 /test cases
parentc6755e1399191957e6fe8551b07a2d7f139ef5a8 (diff)
downloadmeson-e13f8136268124b5591c8151130137599d313153.zip
meson-e13f8136268124b5591c8151130137599d313153.tar.gz
meson-e13f8136268124b5591c8151130137599d313153.tar.bz2
Tuned alignment check.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/45 alignment/meson.build9
1 files changed, 7 insertions, 2 deletions
diff --git a/test cases/common/45 alignment/meson.build b/test cases/common/45 alignment/meson.build
index 703011a..0cbc458 100644
--- a/test cases/common/45 alignment/meson.build
+++ b/test cases/common/45 alignment/meson.build
@@ -8,6 +8,11 @@ if cc.alignment('char') != 1
error('Alignment of char misdetected.')
endif
-if cc.alignment('double') != 8
- error('Alignment of double misdetected.')
+ptr_size = cc.sizeof('void*')
+dbl_alignment = cc.alignment('double')
+
+if ((ptr_size == 4) and (dbl_alignment == 4)) or ((ptr_size == 8) and (dbl_alignment == 8))
+ message('Alignment of double ok.')
+else
+ error('Alignment of double erroneous.')
endif