<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/159989>159989</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Failure building fortran-sdl2 binding interfaces
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
angelog0
</td>
</tr>
</table>
<pre>
`flang` fails to build [fortran-sdl2](https://github.com/interkosmos/fortran-sdl2). For example, as STC
```
$ flang `sdl2-config --cflags` -O3 -fPIC -c src/c_util.f90
error: Semantic errors in src/c_util.f90
./src/c_util.f90:12:27: error: PARAMETER attribute was already specified on 'c_uint8_t'
integer, parameter :: c_uint8_t = c_int8_t
^^^^^^^^^
./src/c_util.f90:12:27: error: 'c_uint8_t' is use-associated from module 'iso_c_binding' and cannot be re-declared
integer, parameter :: c_uint8_t = c_int8_t
^^^^^^^^^
[...]
```
The same command works with `gfortran`, indeed I use it for my programs!
I tested this in MSYS2/UCRT64 with
```
$ flang --version
flang version 21.1.1
Target: x86_64-w64-windows-gnu
Thread model: posix
InstalledDir: C:/msys64/ucrt64/bin
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUVE2PozgQ_TXmUgIZ8xE4cKDTjdSH0Y66s4c9RcYuiHeMHdmm0_n3K5NodnZmp6W2HAWKqser8uNx79VsEDtSPZDqMeFrOFnXcTOjtjNNRiuvHanppLmZSU1h4kp7CBbGVWkJpHqYrAuOm9RLzUj1SFhzCuHsSdETNhA2zCqc1jETdiFsUCag-2b9Yj1hw39KWZvBYB3gO1_OGgnbA_fwetgT2sdd0_umPWElbIyA1DQWp8KaSc2QpmLSfPaRafpHAen09XkPqQDvBGGDOK5B6WxqIwg6Zx0penjFhZugBGwRD8r8X3pG2PBLuOhzRoqe7SLOd8Cv_Uv_5enw9AI8BKfGNSBcuAeuHXJ5BX9GoSaFEqwBwnbiuCoTmmMgbEdoD9uKk5rRxTGcueMLBnQQh1r08L0ASPEI4nivpj2Q6um3-1M9_EQLlIfVY8q9t0LxgBImZxdYrFw1xmzl7VEcR2WkMnOs4EaC4MbYACOCw1Si0Nyh_GSLP6zPdUuqhyzLoiR_FRDtDycEzxcEYZclcr1Y983DRYVTVNV812bMZ3tQRiJKeI5DABVgsg6WK5ydnR1fPGH5DfUZAvo4nXBSm5K-vP71yggb_ty_HOpyg_9Iz2n6hs4rawjtb5H7PbA8y7P4lgN3M4Y4o_emPtZleok_ZaS9-HQ269ZbFFo8HNQx8Wy9eo_sjA9ca5SPajvk_e0jXfzV1yVhwypc2C5GZX6imMiukG3R8gS7fFc1Zd02TZGcuh1tW8ZzOo5lzku5K5qmqVgl2a5sRk7rRHWMsoq2LM-rKmdFJqe8pVNeyIkirUZGSooLVzrT-m3JrJsT5f2KXV61bdMmmo-o_WZQjBm8wPaUsGg2ietiUTqusycl1coH_y9MUEFjN3ClV4c3w1Jmhh9dB-6C3bToJi7QJ6vT3QcWFuHvf-nZ2b9RhGhskVT0tDvrt479EwAA__-LiaJc">