Skip to content

Failure building fortran-sdl2 binding interfaces #159989

@angelog0

Description

@angelog0

flang fails to build 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions