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

    <tr>
        <th>Summary</th>
        <td>
            `volatile int` is trivially copyable but not trivially relocatable
        </td>
    </tr>

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

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

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

<pre>
    https://godbolt.org/z/4Y9z7sdEE
This Godbolt shows that clang considers `struct S { volatile int i; };` "trivially relocatable", but `volatile int` is considered "not-trivially relocatable". This is inconsistent. It's also inconsistent with the behavior of `std::is_trivially_copyable_v<volatile int> == true`. `__is_trivially_relocatable` should do the same. Otherwise, we end up with a type that is trivially copyable but not trivially relocatable.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUUz1v2zwQ_jWn5RCBJvVhDhrsOHrxDkULtEsngxIvFgtaNMSTDefXF5TbJC7SoQABDsfn4547mhjdYSRqoNxCucvMzEOYms2nL1rrrAv22gzMpwhqA7IF2R6C7YLnPEwHkO0LyLb4rl_qaJ-eQOxAbL4NLuJ_t1cYh3CJyINh7L0ZD9iHMTpLU0SoRORp7hm_ItRbPAdv2HlCNzI6UFuEegdqC5VAkJInd3bG-ytO5ENv2HSeQEqQj9jNnOjeMySUi69yZBPHGPjhbzw5LsbTGRdUZBo5x_8ZZB3R-BjuKnhxPCAPhB0N5uzChOH51pRNYamNi_tXsX0fTtektD-Derwzqp4Q1A7UDnmaCSqRJ5b9_g7-3mslUqyzt2jDYiCaI-X4mQeaLi5SSuRCSKPF-XSzaZCvJ7rNwUV8y-C3rSXCMTB-GE-e2UZZrbTJqFnVoigqUayKbGgkmaq22qz7UpAyupadLlWtu-65X_eiylwjhSzESpQrtVKqyK2Wa2HrWpv1uiirEgpBR-N87v35mLYqczHO1NS10KvMm458XJZTypEuuBTT2MtdNjUJ89DNhwiF8C5yfGNhx56aj7fiX_vP5sn_-Q0cD3OX9-EIsk2iv66H0xR-UM8g28VqBNkurfwMAAD__6J_I_o">