<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/107422>107422</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [Clang] clang::Expr::ClassifyImpl(clang::ASTContext&, clang::SourceLocation*) const: Assertion `isPRValue()' failed.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          yijan4845
      </td>
    </tr>
</table>

<pre>
    Compiler Explorer: [https://godbolt.org/z/4YxhxYaox](https://godbolt.org/z/4YxhxYaox)

Attempting to compile below program with Clang Assertion Trunk:
```c
void (*ptr)( void a = a = a );
```

It seems to be similar to [50821](https://github.com/llvm/llvm-project/issues/50821). Both cases are about function pointer but that case won't crash on current trunk.

Stack dump:
```
clang-20: /root/llvm-project/clang/lib/AST/ExprClassification.cpp:72: Cl clang::Expr::ClassifyImpl(clang::ASTContext&, clang::SourceLocation*) const: Assertion `isPRValue()' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -dumpdir /app/output.s- -disable-free -clear-ast-before-backend -main-file-name example.c -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -fno-verbose-asm -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb -fdebug-compilation-dir=/app -fcoverage-compilation-dir=/app -resource-dir /opt/compiler-explorer/clang-assertions-trunk-20240904/lib/clang/20 -internal-isystem /opt/compiler-explorer/clang-assertions-trunk-20240904/lib/clang/20/include -internal-isystem /usr/local/include -internal-isystem /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/15.0.0/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O0 -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcolor-diagnostics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/example-a54813.o -x c <source>
1.      <source>:1:29: current parser token ')'
 #0 0x0000000003b089d8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x3b089d8)
 #1 0x0000000003b0611c SignalHandler(int) Signals.cpp:0:0
 #2 0x00007289dae42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #3 0x00007289dae969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #4 0x00007289dae42476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #5 0x00007289dae287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #6 0x00007289dae2871b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
 #7 0x00007289dae39e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
 #8 0x000000000797d1b5 clang::Expr::ClassifyImpl(clang::ASTContext&, clang::SourceLocation*) const (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x797d1b5)
 #9 0x000000000797d39d clang::Expr::isModifiableLvalue(clang::ASTContext&, clang::SourceLocation*) const (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x797d39d)
#10 0x0000000006b0473c CheckForModifiableLvalue(clang::Expr*, clang::SourceLocation, clang::Sema&) SemaExpr.cpp:0:0
#11 0x0000000006b5d867 clang::Sema::CheckAssignmentOperands(clang::Expr*, clang::ActionResult<clang::Expr*, true>&, clang::SourceLocation, clang::QualType, clang::BinaryOperatorKind) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x6b5d867)
#12 0x0000000006b5ee4e clang::Sema::CreateBuiltinBinOp(clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x6b5ee4e)
#13 0x0000000006b6021d clang::Sema::BuildBinOp(clang::Scope*, clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x6b6021d)
#14 0x0000000006b609f1 clang::Sema::ActOnBinOp(clang::Scope*, clang::SourceLocation, clang::tok::TokenKind, clang::Expr*, clang::Expr*) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x6b609f1)
#15 0x00000000065e93a7 clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*, true>, clang::prec::Level) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x65e93a7)
#16 0x00000000065b9f54 clang::Parser::ParseParameterDeclarationClause(clang::DeclaratorContext, clang::ParsedAttributes&, llvm::SmallVectorImpl<clang::DeclaratorChunk::ParamInfo>&, clang::SourceLocation&, bool) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x65b9f54)
#17 0x00000000065bb248 clang::Parser::ParseFunctionDeclarator(clang::Declarator&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x65bb248)
#18 0x00000000065bfe89 clang::Parser::ParseDirectDeclarator(clang::Declarator&) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x65bfe89)
#19 0x00000000065acb66 clang::Parser::ParseDeclaratorInternal(clang::Declarator&, void (clang::Parser::*)(clang::Declarator&)) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x65acb66)
#20 0x00000000066de6b1 clang::Sema::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x66de6b1)
#21 0x00000000065afbbb clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::ParsedAttributes&, clang::Parser::ParsedTemplateInfo&, clang::SourceLocation*, clang::Parser::ForRangeInit*) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x65afbbb)
#22 0x000000000656f9ee clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x656f9ee)
#23 0x000000000657019e clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x657019e)
#24 0x00000000065767e7 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x65767e7)
#25 0x00000000065776bd clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x65776bd)
#26 0x0000000006577b60 clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x6577b60)
#27 0x000000000656ab72 clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x656ab72)
#28 0x00000000044549e8 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x44549e8)
#29 0x00000000046e6ad9 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x46e6ad9)
#30 0x000000000466a0ae clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x466a0ae)
#31 0x00000000047d057e clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0x47d057e)
#32 0x0000000000ca9aef cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0xca9aef)
#33 0x0000000000ca2d3a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#34 0x0000000000ca666e clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0xca666e)
#35 0x0000000000b7a7b4 main (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0xb7a7b4)
#36 0x00007289dae29d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#37 0x00007289dae29e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#38 0x0000000000ca27ee _start (/opt/compiler-explorer/clang-assertions-trunk-20240904/bin/clang-20+0xca27ee)
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see invocation)

```



</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzcWl9v27iX_TTKC0FDov5ZD3lw7Hom2A7abYIZzJNBUVc2JxKpJanU2U-_ICUnpu04SXdcFL-idWWaujzn3MvLS4lUa74WANdBehOkiyvam41U10_8HyqSaZJelbJ6up7LtuMNKPRp2zVSgQriGQrSm40xnQ7iWUCWAVmuZVXKxkykWgdk-b8BWSZ_bzfbv6ncBukiINP3dydFEC6CcDZ8zoyBtjNcrJGRiA1gUAmN_I46JdeKtug7Nxs0b6hYo5nWoAyXAt2rXjzYAQdjWTj8ZcP3R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