diff options
author | Darren Tucker <dtucker@zip.com.au> | 2016-08-17 13:35:43 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2016-08-17 13:35:43 +1000 |
commit | a8fc0f42e1eda2fa3393d1ea5e61322d5e07a9cd (patch) | |
tree | 0a4f9af1a8ff8c4f555767a628cbcb55ffb62a9d /aclocal.m4 | |
parent | a1cc637e7e11778eb727559634a6ef1c19c619f6 (diff) |
Test multiplying two long long ints.
When using clang with -ftrapv or -sanitize=integer the tests would pass
but linking would fail with "undefined reference to __mulodi4".
Explicitly test for this before enabling -trapv.
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index 1640683e1..ac6b6684a 100644 --- a/aclocal.m4 +++ b/aclocal.m4 | |||
@@ -1,5 +1,3 @@ | |||
1 | dnl $Id: aclocal.m4,v 1.13 2014/01/22 10:30:12 djm Exp $ | ||
2 | dnl | ||
3 | dnl OpenSSH-specific autoconf macros | 1 | dnl OpenSSH-specific autoconf macros |
4 | dnl | 2 | dnl |
5 | 3 | ||
@@ -59,7 +57,8 @@ int main(int argc, char **argv) { | |||
59 | float l = i * 2.1; | 57 | float l = i * 2.1; |
60 | double m = l / 0.5; | 58 | double m = l / 0.5; |
61 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; | 59 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; |
62 | printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); | 60 | long long int p = n * o; |
61 | printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p); | ||
63 | exit(0); | 62 | exit(0); |
64 | } | 63 | } |
65 | ]])], | 64 | ]])], |
@@ -96,7 +95,8 @@ int main(int argc, char **argv) { | |||
96 | float l = i * 2.1; | 95 | float l = i * 2.1; |
97 | double m = l / 0.5; | 96 | double m = l / 0.5; |
98 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; | 97 | long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; |
99 | printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); | 98 | long long p = n * o; |
99 | printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p); | ||
100 | exit(0); | 100 | exit(0); |
101 | } | 101 | } |
102 | ]])], | 102 | ]])], |