-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Crash with unsigned _BitInt(1) global variable #62207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@llvm/issue-subscribers-clang-codegen |
The values when the assertion fails are: (lldb) p C->getType()->getScalarSizeInBits()
(unsigned int) $0 = 1
(lldb) p Ty->getScalarSizeInBits()
(unsigned int) $1 = 1 |
I am guessing this code: // Zero-extend bool.
if (C->getType()->isIntegerTy(1)) {
llvm::Type *boolTy = CGM.getTypes().ConvertTypeForMem(destType);
return llvm::ConstantExpr::getZExt(C, boolTy);
} Needs to handle |
@llvm/issue-subscribers-c2x |
Usually |
Right, we don't want to extend the bit-ints unless necessary for ABI reasons, so normal loads/stores shouldn't expand them. |
This code causes an assertion failure in Clang CodeGen for all targets (I've tested x86_64, Arm and AArch64:
The text was updated successfully, but these errors were encountered: