mirror of
git://repo.or.cz/tinycc.git
synced 2026-11-04 21:26:36 +08:00
tests: account for Clang array qualifier behavior
Some checks failed
build and test / test-x86_64-linux (push) Has been cancelled
build and test / test-x86_64-osx (push) Has been cancelled
build and test / test-aarch64-osx (push) Has been cancelled
build and test / test-x86_64-win32 (push) Has been cancelled
build and test / test-i386-win32 (push) Has been cancelled
build and test / test-arm64-win32 (push) Has been cancelled
build and test / test-armv7-linux (push) Has been cancelled
build and test / test-aarch64-linux (push) Has been cancelled
build and test / test-riscv64-linux (push) Has been cancelled
build and test / test-i386-linux (push) Has been cancelled
Some checks failed
build and test / test-x86_64-linux (push) Has been cancelled
build and test / test-x86_64-osx (push) Has been cancelled
build and test / test-aarch64-osx (push) Has been cancelled
build and test / test-x86_64-win32 (push) Has been cancelled
build and test / test-i386-win32 (push) Has been cancelled
build and test / test-arm64-win32 (push) Has been cancelled
build and test / test-armv7-linux (push) Has been cancelled
build and test / test-aarch64-linux (push) Has been cancelled
build and test / test-riscv64-linux (push) Has been cancelled
build and test / test-i386-linux (push) Has been cancelled
Clang doesn't combine qualifiers through array types so put a workaround into tcctest.c to avoid spurious failures of the recently-added tests for that operation, when using Clang instead of GCC to generate the reference output.
This commit is contained in:
parent
0cd015b4ed
commit
3dc99dbc82
@ -3956,6 +3956,7 @@ void builtin_test(void)
|
||||
COMPAT_TYPE(int[2], const int[2]);
|
||||
COMPAT_TYPE(int[2][3], volatile int[][3]);
|
||||
COMPAT_TYPE(int (*)[], const int (*)[]);
|
||||
#ifndef __clang__
|
||||
COMPAT_TYPE(__typeof__(1 ? (const int (*)[2])0 : (int (*)[2])0),
|
||||
const int (*)[2]);
|
||||
COMPAT_TYPE(__typeof__(1 ? (const int (*)[2][3])0 :
|
||||
@ -3964,6 +3965,12 @@ void builtin_test(void)
|
||||
COMPAT_TYPE(__typeof__(1 ? (volatile int (*)[2][3])0 :
|
||||
(const int (*)[2][3])0),
|
||||
const volatile int (*)[2][3]);
|
||||
#else
|
||||
/* clang doesn't combine qualifiers through array types */
|
||||
printf("__builtin_types_compatible_p(__typeof__(1 ? (const int (*)[2])0 : (int (*)[2])0), const int (*)[2]) = 1\n");
|
||||
printf("__builtin_types_compatible_p(__typeof__(1 ? (const int (*)[2][3])0 : (volatile int (*)[2][3])0), const volatile int (*)[2][3]) = 1\n");
|
||||
printf("__builtin_types_compatible_p(__typeof__(1 ? (volatile int (*)[2][3])0 : (const int (*)[2][3])0), const volatile int (*)[2][3]) = 1\n");
|
||||
#endif
|
||||
COMPAT_TYPE(int *, int *);
|
||||
COMPAT_TYPE(int *, void *);
|
||||
COMPAT_TYPE(int *, const int *);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user