CSKY is always in 4-byte align, no matter it's long long type. For global aggregate variable, it's 4-byte align if its size is bigger than or equal to 4 bytes.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/test/Sema/builtin-alloca-with-align.c | ||
---|---|---|
32 | This test is platform agnostic, perhaps the extra error could be in a new test, exclusively for csky? |
clang/test/Sema/builtin-alloca-with-align.c | ||
---|---|---|
32 | Then I prefer to split the file and add UNSUPPORTED for CSKY in the other file which only contains test8 |
clang/test/Sema/builtin-alloca-with-align.c | ||
---|---|---|
32 | But then you wouldn't be testing the extra error you want... hmm. Maybe it would be fine the way you did it originally. Would be nice to get a clang person to give their opinion. |
clang/test/Sema/builtin-alloca-with-align.c | ||
---|---|---|
32 | // Comment which explains why this is special. I think I would test this slightly differently: void test8(void) { __builtin_alloca_with_align(sizeof(__INT64_TYPE__), __alignof__(__INT64_TYPE__)); // expected-warning {{second argument to __builtin_alloca_with_align is supposed to be in bits}} #ifdef __csky__ // expected-error@-2 {{requested alignment must be 8 or greater}} // Comment which explains why this is special. #endif // __csky__ } |
clang/test/Sema/builtin-alloca-with-align.c | ||
---|---|---|
32 | Reusing the first warning is good. |
This test is platform agnostic, perhaps the extra error could be in a new test, exclusively for csky?