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

    <tr>
        <th>Summary</th>
        <td>
            [Clang] clang does not check section name declaration
        </td>
    </tr>

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

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

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

<pre>
    
```
#define A(X)    __attribute__((section(X)))

int k A("bar");
__thread int l A("bar");  /* { dg-error "causes a section type conflict" "conflict with user-defined section" } */
```

https://godbolt.org/z/7saxcWq75
gcc could find the conflict between variant K and variant l, but clang could not. I think this could be a problem.


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsks-O4ygQxp8GX0qJnMLEzsGHdEeRVrt72pVmbhF_yjYTAhnA3dPz9CMcq3s0agmVVfhH8RVfyZTs6Il6Jp6YOFVyzlOI_T_zlf77_99KBfPWs_rE6iPb1-t6pMgNDdYTHBl2XxkeAAAuF5lztGrOdLkw7Bh2iXS2wa_Quh4llmh9hutShCEqGRliIfjT4_flkqdI0kDh3GccAMMzwyOw9gnMuKEYQwSGqOWcKIGEVQLktzuBDn5wVmeGuEBrCq82TzAniptHXwbelSOw9gQMj-WiTx9jiVPO98T4QuF5DEYFl7chjgzPPxme2yR_6C_fW_HAR61Bh9kZGKw3kKcPbaAovxJ5eJHRSp_hb5DevGeO4TOoOYN20o9rER_yFv6CPFl_LTGt-4pAwj0G5ei2_V1uZXpuDvwgK-p3bc1bzhvRVFOvGkUdGUSBYhBqb9rOqFqJQfLDvuGmsj3WyHeIXc13LW-2HActxF6KnVBijwNrarpJ67bOvdzKC1Q2pZn6dt90TeWkIpeWiUNcWiheilMV-8Jv1Dwm1tTOppw-KmSb3TKmz8sJcVq7N4FSaR70RPr67rWXNwJD2skoy0Y1R9f_4ZDN06y2OtwYnss962dzj-EblQk5L7JT8a4o_xUAAP__Yav3tg">