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

    <tr>
        <th>Summary</th>
        <td>
            Error using “clang hello.cpp -o hello -lstdc++ -ccc-print-phases” in WSL Ubuntu 24.04 LTS
        </td>
    </tr>

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

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

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

<pre>
    using command : clang hello.cpp -o hello -lstdc++  is OK, but:

clang hello.cpp -o hello -lstdc++ -ccc-print-phases
            +- 0: input, "hello.cpp", c++
         +- 1: preprocessor, {0}, c++-cpp-output
      +- 2: compiler, {1}, ir
   +- 3: backend, {2}, assembler
+- 4: assembler, {3}, object
clang: /home/qiwei/llvm-project/llvm/include/llvm/ADT/SmallVector.h:308: const_reference llvm::SmallVectorTemplateCommon<const char *>::operator[](size_type) const [T = const char *]: Assertion `idx < size()' failed.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyck8-uozYUh5_msLFA5gDBLFiQ5LLpSF3ctF2OjDkJbg2mtpl2-vQVf3oT3VU1LJBsft9nbJ8jvdePiaiG4gzFNZJLGKyr07IUFYoq6mz_vV68nh5M2XGUU8_grYXzBaqGKSOnBxvIGJuoeWax3QcsNj70CvAMeGZMe_bzTwclLqxbwocC-BX48f5_tlgpFc9OTyGeB-nJ7zB7eQDPMeOQNUxP8xIALwwQP8SAuE4dwk_4xqYrOzuanVXkvXWbojxzKK8vaKzmObZLWNd4sWwKXBXKjrM29B-eHrh2H_Etm63ZTqo_aOqPKB5R6T2N3arYD2qN52v8-WEHsgOw3e-kwsuBrmHAdrAjAbZ_6r9IA7bGfBvj2dktvA8BWz0ps_T0nGiuN8D2fZTG_EoqWJcMkDUZF_vuJh--OrqTo0kR25isgax5AW40zkYGuthxtBNkl41iapCOATaQve2IncnJYN1ehoDC63_oa_g-E2C1L8WgON8YZFf2yVFc199pvCcXtJ0YnLju_2aQXdhqARSAFWDJ7lIb6pOor7O-yioZUZ2WmGLFRc6joRZFWpWkelFWJ0qJF2XPC1Ei8ruQ-SmPdI0cc16mggvkOU_Sk-BSVN09Q1meRAE5p1Fqk6yHkVj3iLT3C9VVledlZGRHxm-thrjfDuLada7eLqRbHh5ybrQP_mkIOhiq35yzju2dCG8IgkN1-dGWOfgr0xP77f0L-6VbprAwzBOesy-392hxph5CmP16O9gCtg8dhqVLlB2f5fGpiratesB23-23Gv8NAAD__9HqSoY">