[PATCH] D151587: [clang][ConstantEmitter] have tryEmitPrivateForVarInit try ConstExprEmitter fast-path first
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 6 13:16:38 PDT 2023
nickdesaulniers added a comment.
In D151587#4399684 <https://reviews.llvm.org/D151587#4399684>, @ahatanak wrote:
> Is there a github issue for this crash?
I'm not aware, but I also haven't looked.
> Is anyone looking into this?
I guess I am tangentially as it seems to be a blocker for this patch.
> The following code crashes too:
>
> typedef union {
> unsigned int f0;
> } Union0;
>
> typedef struct {
> _Atomic(Union0) f1;
> } Struct0;
>
> Struct0 g = {};
>
> It looks like there is a bug here: https://github.com/llvm/llvm-project/blob/main/clang/lib/AST/ExprConstant.cpp#L15066
>
> `Value` is being discarded after the call to `EvaluateAtomic`.
I have no idea if D152303 <https://reviews.llvm.org/D152303> is correct, but PTAL. Thanks for identifying such code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151587/new/
https://reviews.llvm.org/D151587
More information about the cfe-commits
mailing list