<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=http://email.email.llvm.org/c/eJytVE1v4yAQ_TXkgmzZ2I7jgw9pPnqpWml3uz1jwDZbAhHgpv33O-CmTffjsNpKKGHMzHtvmCc6w1_aB-lHzMzhKJXA5uil0Q4Va4wIYYrqAZErWPhApU7Z8YgTE_c4ueup8zhxnqNiy-Y00sEHnByoZSN81dTLJ4GTXpvEei_nnXhmYuaBeHIiUQFBKY6TB6oUECOywSjbomztR3EWZzGz1I3C4dMoNO6pVFIP2BsckqhzwgZQ0A4ISnaI7DeGi2uhw-5693y0oQE4J_WyCi3O_UF-sT5nxuDmO1WT-Ovxa7CfNDsTFuvdQfqtYOqL6OdyRFYMWvSXMK8JQQoiILMJKtZn5RgtM6i63Sao2El37wSHsKfKAViDUb2BBXPJpaOo2HynNuBBbiy6SNnNALdG33F7H6pXHwFiwiD8jWE0thATUulAueRzFCvIElawwtfRTDAgbTyGiWEOxPgEzjGTBzvYxzAJGc-gPI8jrOOIBE8hSl_H-Q0mdbRmsPSAGdW4e5suh421gnn1guEqwkgV9QLub2AsyUlkw04epKL2N7-S1Wwq3Bv7bqrQxAZTzYM0K47Gegct4BO1GgS7dBaFqqvgaCBpirIOHkn9s0cVXOlq9P7ooqX2sAbQMHUpsEOg1NP5L4GefoB2CHuQBXr2dd00eQ4Xuf8TNig7U3eUPXpLmfgsUgIm2n9EvaC7VOPGT-PMf2n0FfqNOP4ueFvwpmjogk5gHduO9Elw2feSTcq_SN1LzWEwmh6EW0xWtf-sSjo3RVkVaapyMbYVX3FByrJoeJX3nOZLRnLKalbxjvT1aqFoJ5Rr4WrAp1qccIQIDq62i_9XIFuSEZLlGcmLIiublGZlxXNCRFmvQE2BykzAzak04KTGDgvbRshuGhwcKum8ez-Ed04OWogoGBR66ZVoNx-eSAzPc2-N9onQfBEFtVHNT1Cj3ys>52954</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Compiler crash in front-end
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    With compile options: "clang++ main.cpp -o main -Ofast -std=c++2b -s -march=native -fno-rtti -fno-exceptions -fuse-ld=lld -Wall", 
the compiler crashes when failing to the assertion:"lib/CodeGen/CGExpr.cpp:2765: clang::CodeGen::LValue clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(const clang::DeclRefExpr*): Assertion `(ND->isUsed(false) || !isa<VarDecl>(ND) || E->isNonOdrUse() || !E->getLocation().isValid()) && "Should not use decl without marking it used!"' failed.". 
The program can be compiled correctly on the latest gcc-12 with similar compile options(except for -fuse-ld), and it reports no warnings.
[main-129347.cpp.txt](https://github.com/llvm/llvm-project/files/7799118/main-129347.cpp.txt)
[backtrace.txt](https://github.com/llvm/llvm-project/files/7799120/backtrace.txt)
[main-129347.sh.txt](https://github.com/llvm/llvm-project/files/7799121/main-129347.sh.txt)


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJytVE1v4yAQ_TX4gmzZ2E7igw9pPnqpWml3254xYJstgQhw0_77HXDTpvtxWKkSShgz894b5tmd4a_to_QjZuZwlEpgc_TSaIfKNUaEMEX1gMgVLHygUmfseMSpiXuc3vXUeZw6z1G5ZXMa6eABTg_UshGeaurls8Bpr01qvZfzTrwwMfNAPDmRqoCgFMfpI1UKiBHZYJRvUb72oziLs5hZ6kbh8GkUGvdUKqkH7A0OSdQ5YQMoaAcEJTtE9hvDxbXQYXe9ezna0ACck-WiDi3O_UF-uT5nxuDmgapJ_PP4LdhPmp0Jy_XuIP1WMPVN9HM5IisGLfpLmLeEIAURkNkEFeuzcowWOVTdblNU7qS7d4JD2FPlAKzBaLmBBXMppKOo3DxQG_AgNxZdpOxmgFuj77i9D9WrzwAxYRD-xjAaW4gJmXSgXPI5ihVkAStY4ftoJhiQNh7DxDAHYnwC55jJgx3sU5iEjGdQXsQRLuOIBM8gyt7G-QMmdbRmsPSAGdW4e58uh421gnn1iuEqwkgV9QLub2AsLUhkw04epKL2D7-S1Wwq3Bv7YarQxAZTzYM0K47Gegct4BO1GgS7bBaF6qvgaCBpymoZPJL5F49quNLV6P3RRUvtYQ2gYeoyYIdAqefzXwo9_QTtEPYgC_Tsl8umKQq4yP3fsEHZmbqj7MlbysRXkRIw0f4z6gXdpRo3fhln8Vujb9DvxPE34W3Jm7KhiZdeiXbz6cXG8FHprdE-FZonk1Xtf2uSzk1RVE2aukrGtqxywvJVXzU14XXdFHTV9bTirM5FteirRNFOKNfCxYBLtTjhCBH8W28T2ZKckLzISVGWedVkNK9qXhAiquWKFosSVbmArlUWdGTGDolto6RuGhwcKum8-ziEb5QctBCRDvDpBC-QbUf6LLjse8km5V-l7qXmYE9ND8IlUU8b-_kFi5DJIg">