aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authordrh <>2023-07-05 18:59:52 +0000
committerdrh <>2023-07-05 18:59:52 +0000
commite68899f1e4a4feac59b3ec61c6bfa1b78f221a6c (patch)
treedd0c3c56d13ccc9c3bf2bc9da4a6ae7182502cda /src/util.c
parent85ca6d7ace79dace5d9dd347663272332caf0129 (diff)
downloadsqlite-e68899f1e4a4feac59b3ec61c6bfa1b78f221a6c.tar.gz
sqlite-e68899f1e4a4feac59b3ec61c6bfa1b78f221a6c.zip
Work around for an apparent GCC bug. See
[forum:/info/ee7278611394034c|forum post ee7278611394034c] for details. FossilOrigin-Name: 5d9e9364808793d65925d4efbfde0f4246df258758f15e8ce1105070d1018fe6
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index e15e037fb..52dc09a7d 100644
--- a/src/util.c
+++ b/src/util.c
@@ -386,6 +386,16 @@ u8 sqlite3StrIHash(const char *z){
return h;
}
+/*
+** Work around an apparent bug in GCC.
+** https://sqlite.org/forum/info/ee7278611394034c
+*/
+#ifdef i386
+#pragma GCC push_options
+#pragma GCC optimize("float-store")
+#endif
+
+
/* Double-Double multiplication. (x[0],x[1]) *= (y,yy)
**
** Reference:
@@ -413,6 +423,11 @@ static void dekkerMul2(double *x, double y, double yy){
x[1] += cc;
}
+/* End of the GCC bug work-around */
+#ifdef i386
+#pragma GCC pop_options
+#endif
+
/*
** The string z[] is an text representation of a real number.
** Convert this string to a double and write it into *pResult.