From cbb18429f1c3dcfed938f68f504048ea5ccd991b Mon Sep 17 00:00:00 2001 From: Spoike Date: Thu, 28 Jul 2022 02:18:11 +0000 Subject: [PATCH] Work around a gcc optimisation bug. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6301 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/common/sha2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/common/sha2.c b/engine/common/sha2.c index 5fb675f88..f6a1e65de 100644 --- a/engine/common/sha2.c +++ b/engine/common/sha2.c @@ -132,6 +132,9 @@ static void sha2trunc_init (void *context) hd->count = 0; } +#if defined(__GNUC__) && (__GNUC__==10) + __attribute__((optimize("no-tree-bit-ccp"))) //gcc (Debian 10.2.1-6) 10.2.1 20210110 miscompiles without this (eg: test webrtc compat with a browser) +#endif fte_inlinestatic u64 ROTR (u64 x, u64 n) {