Skip to content
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

Anonymous struct construct causes a Clang front-end assertion. #86855

Open
dgilmore83 opened this issue Mar 27, 2024 · 1 comment
Open

Anonymous struct construct causes a Clang front-end assertion. #86855

dgilmore83 opened this issue Mar 27, 2024 · 1 comment
Labels
clang:codegen crash Prefer [crash-on-valid] or [crash-on-invalid]

Comments

@dgilmore83
Copy link

A ToT "asserts" build of Clang in the following test case that uses the anonymous struct construct. I attached the test case per the "HowToSubmitABug" instructions:
anon-6e7926.cpp.txt
anon-6e7926.sh.txt

The assertion message is:
clang++: /tmp/dgilmore/tt/clang/lib/CodeGen/CGExprAgg.cpp:1751: void {anonymous}::AggExprEmitter::VisitCXXParenListOrInitListExpr(clang::Expr*, llvm::ArrayRefclang::Expr*, clang::FieldDecl*, clang::Expr*): Assertion `(Field->isUnnamedBitfield() || Field->isAnonymousStructOrUnion()) && "Only unnamed bitfields or ananymous class allowed"' failed.

@github-actions github-actions bot added the clang Clang issues not falling into any other category label Mar 27, 2024
@EugeneZelenko EugeneZelenko added clang:codegen crash Prefer [crash-on-valid] or [crash-on-invalid] and removed clang Clang issues not falling into any other category labels Mar 27, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Mar 27, 2024

@llvm/issue-subscribers-clang-codegen

Author: None (dgilmore83)

A ToT "asserts" build of Clang in the following test case that uses the anonymous struct construct. I attached the test case per the "HowToSubmitABug" instructions: [anon-6e7926.cpp.txt](https://github.com/llvm/llvm-project/files/14780063/anon-6e7926.cpp.txt) [anon-6e7926.sh.txt](https://github.com/llvm/llvm-project/files/14780067/anon-6e7926.sh.txt)

The assertion message is:
clang++: /tmp/dgilmore/tt/clang/lib/CodeGen/CGExprAgg.cpp:1751: void {anonymous}::AggExprEmitter::VisitCXXParenListOrInitListExpr(clang::Expr*, llvm::ArrayRef<clang::Expr*>, clang::FieldDecl*, clang::Expr*): Assertion `(Field->isUnnamedBitfield() || Field->isAnonymousStructOrUnion()) && "Only unnamed bitfields or ananymous class allowed"' failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:codegen crash Prefer [crash-on-valid] or [crash-on-invalid]
Projects
None yet
Development

No branches or pull requests

3 participants