On 3/18/23 11:34, avih wrote:

This is a second reply to the same email.

On Tuesday, March 14, 2023, 06:02:35 PM GMT+2, Herman ten Brugge <[email protected]> wrote:

> Can you change the code in 'tests/tcctest.c' on line 3865 to '#if
> GCC_MAJOR >= 40'.

This works. Specifically, only the __builtin_clrsb* are an issue,
while the others are fine.
Can you try attached patch.

    Herman
diff --git a/tests/tcctest.c b/tests/tcctest.c
index 6ae5a77..570cff2 100644
--- a/tests/tcctest.c
+++ b/tests/tcctest.c
@@ -3875,9 +3875,11 @@ static void builtin_test_bits(unsigned long long x, int 
cnt[])
     if ((unsigned long) x) cnt[7] += __builtin_ctzl(x);
     if ((unsigned long long) x) cnt[8] += __builtin_ctzll(x);
 
+#if !defined(__clang__) ||  GCC_MAJOR >= 11
     cnt[9] += __builtin_clrsb(x);
     cnt[10] += __builtin_clrsbl(x);
     cnt[11] += __builtin_clrsbll(x);
+#endif
 
     cnt[12] += __builtin_popcount(x);
     cnt[13] += __builtin_popcountl(x);
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to