efriedma added inline comments.
================ Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4639 + getDataLayout().getTypeAllocSize(Init->getType())); + assert(VarSize == CstSize && "Emitted constant has unexpected size"); +#endif ---------------- ahatanak wrote: > This assertion fails when the following code is compiled: > > > ``` > typedef unsigned char uint8_t; > typedef uint8_t uint8_a16 __attribute__((aligned(16))); > > void foo1() { > static const uint8_a16 array1[] = { 1 }; > } > ``` `sizeof(uint8_a16[1])` is 16, but we currently emit a one-byte global. So it seems like there's an underlying bug exposed by the assertion. gcc thinks this is nonsense, and just prints an error. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123649/new/ https://reviews.llvm.org/D123649 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits