stacks: disable some optimizations on clang (<= 17 +version+ 22)

clang miscompiles some functions since the version 17; we bump the version from
19 to 22, because it was confirmed that it is still the case. Fixes #838.
This commit is contained in:
Daniel Kochmański 2026-04-26 10:17:50 +02:00
parent b8f55b1354
commit d39cc449f7

View file

@ -281,7 +281,7 @@ ecl_stack_frame_open(cl_env_ptr env, cl_object f, cl_index size)
/* Some clang versions miscompile the following function on x86_64.
* Temporarily turn off optimizations here. */
#if defined(__clang__) && __clang_major__ >= 17 && __clang_major__ <= 19 && defined(__x86_64__)
#if defined(__clang__) && __clang_major__ >= 17 && __clang_major__ <= 22 && defined(__x86_64__)
[[clang::optnone]]
#endif
void
@ -341,7 +341,7 @@ ecl_stack_frame_push_values(cl_object f)
/* Some clang versions miscompile the following function on x86_64.
* Temporarily turn off optimizations here. */
#if defined(__clang__) && __clang_major__ >= 17 && __clang_major__ <= 19 && defined(__x86_64__)
#if defined(__clang__) && __clang_major__ >= 17 && __clang_major__ <= 22 && defined(__x86_64__)
[[clang::optnone]]
#endif
cl_object