diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-04-13 22:57:11 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-04-13 22:57:11 +0200 |
commit | 4dd6603a4500e4de1315f2f1015dc615911d4c3d (patch) | |
tree | 6f9407c8dc24435c1e2fb5cc0f9da1ecad9a4ad5 | |
parent | 7110f7a9ec67f999c68092cfce7072ff8134e991 (diff) | |
download | compcert-kvx-4dd6603a4500e4de1315f2f1015dc615911d4c3d.tar.gz compcert-kvx-4dd6603a4500e4de1315f2f1015dc615911d4c3d.zip |
identify bug from x86
-rw-r--r-- | test/monniaux/math/exceptions.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/monniaux/math/exceptions.c b/test/monniaux/math/exceptions.c index ad3047a0..72107066 100644 --- a/test/monniaux/math/exceptions.c +++ b/test/monniaux/math/exceptions.c @@ -4,7 +4,7 @@ #pragma STDC FENV_ACCESS ON -#ifdef __GNUC__ +#if defined(__K1C__) && !defined(__COMPCERT__) int fetestexcept(int excepts) { int mask = (K1_SFR_CS_IO_MASK | K1_SFR_CS_DZ_MASK | K1_SFR_CS_OV_MASK | K1_SFR_CS_UN_MASK | K1_SFR_CS_IN_MASK) & excepts; unsigned long long cs = __builtin_k1_get(K1_SFR_CS); @@ -77,6 +77,8 @@ int main() { // +41F.307672C5496EF double d8 = 0x1.307672C5496EFp32; unsigned v8 = double2uint(d8); - printf("%g %x %x\n", d8, v8, fetestexcept(FE_ALL_EXCEPT)); // BUG reports 307672C5 and inexact, but should report overflow + printf("%g %x %x\n", d8, v8, fetestexcept(FE_ALL_EXCEPT)); + // BUG reports 307672C5 and inexact, but should report overflow + // bug comes from x86 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89175 feclearexcept(FE_ALL_EXCEPT); } |