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

    <tr>
        <th>Summary</th>
        <td>
            Clang on Windows doesn't eliminate dead code
        </td>
    </tr>

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

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

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

<pre>
    **test.cpp**
```c++
#include <cstdio>

const char *unused() {
    return "I should not be in the final binary, because I am not needed!";
}

int main() {
 printf("Hello, world!\n");
}
```
Compile with: `clang test.cpp -o test.exe -O3`

Then, check the resulting test.exe:
```
$ cat test.exe | grep "I should not"
Binary file (standard input) matches
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxskk-PmzwQxj_NcBklgnGAcOCQTd7o3VMPrdSzsSfBrbGRbfbPt69Mkm61rWQZPDC_eeYZyxjN1TH3UD9BfSrkkkYf-q_SOOmKwev3HugAdEgc01bN8-0E5QnKAzTlbSmgp7xuURLGKbtoRhBHFZM2HsR_94_rrryLCdUoAwIdFrdE1kB7oA6hvWMQEQOnJTgEomeMo1-sRucTDozGYRoZL8ZJi4NxMrwDHXFgJZfI-IxyWn91zDqzKyAC8VDYnv5UY1zCSRr3l4I5GJcua5j-Z2t9LvHqg12B9dFlKHX_4D6MuR2PfpqNZXw1aQRxwOyYle6KD1Nx42_v_Ma4-SJ-Z972byO7XFqNrH6ufQeOi03mgeA3BvF5KI9p7FDJ9IGH9ojXwPNnV3Mva8bT6iZesmKgfUzSaRk0GjcvKRs0yaRGjp_KFboXuhOdLLivWkF11bZNW4y9oH1b64a52pWypFrv6krVourkvhSdrgvTU0m7qqK6bOqmbLdy6MqWL4PqGtVdmgvsSp6ksVtrX6atD9fCxLhwX1VtTaKwcmAb1xtMtBqbe6lPRehzwmZYrhF2pTUxxQ9EMslyf1zn4B1-N07714jac3RAbUK2ZjJOJkbNUqPymosl2H5MaY7ZbjoDna8mjcuwVX4COmf4_bGZg__BKgGdV7ER6HzX-9LTrwAAAP__bqsE2w">