Skip to content

Commit 3c18df6

Browse files
committed
Fix clang macos 15 bug on arm64 in tests/tcctest.c
1 parent f3de8b5 commit 3c18df6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/tcctest.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,6 +1173,10 @@ void char_short_test()
11731173
the presence of undefined behaviour (like __csf is). */
11741174
var1 = csf(unsigned char,0x89898989);
11751175
var4 = csf(signed char,0xabababab);
1176+
#ifdef __clang__
1177+
/* on macos 15 arm64 this prints -1987475063 instead of 137 */
1178+
var1 &= 0xff;
1179+
#endif
11761180
printf("promote char/short funcret %d "LONG_LONG_FORMAT"\n", var1, var4);
11771181
printf("promote char/short fumcret VA %d %d %d %d\n",
11781182
csf(unsigned short,0xcdcdcdcd),

0 commit comments

Comments
 (0)