================ @@ -1,4 +1,12 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple i586-intel-elfiamcu -fsyntax-only -verify %s + +#ifdef __iamcu +// expected-no-diagnostics +struct dummy { int x __attribute__((aligned)); }; +int m0[__alignof__(struct dummy) == 4 ? 1 : -1]; + +#else ---------------- phoebewang wrote:
Maybe only change line 15 and keep others test for iamcu too, e.g., ``` short g0[3] __attribute__((aligned)); + #ifdef __iamcu + short g0_chk[__alignof__(g0) == 4 ? 1 : -1]; + #else short g0_chk[__alignof__(g0) == 16 ? 1 : -1]; + #endif ``` https://github.com/llvm/llvm-project/pull/80401 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits