LLVM 13.0 is available in Fedora 35. I have made some tests in a Fedora Rawhide virtual machine. There is flang-new, which can’t produce yet an executable:
$ flang-new --version
flang-new version 13.0.0 (Fedora 13.0.0~rc1-1.fc35)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
$ flang-new hello.f90
error: code-generation is not available yet
Trying to add a use iso_c_binding statement in an hello world example, I am quite confused:
$ flang hello.f90
./hello.f90:2:9: error: Cannot read module file for module 'iso_c_binding': Source file 'iso_c_binding.f18.mod' was not found
use iso_c_binding
^^^^^^^^^^^^^
error: Semantic errors in hello.f90
flang: in /home/osboxes, flang-new failed with exit status 1: /usr/bin/flang-new -fc1 -module-suffix .f18.mod -fdebug-unparse -fno-analyzed-objects-for-unparse hello.f90
I used flang but the error message says flang-new failed. And why the iso_c_binding module is not available?
flang-new is the driver of the Fortran frontend shipped along with llvm. flang is a shell script that can parse, perform semantics, and unparse and call an external compiler to do the codegen. flang basically calls flang-new internally. When codegen becomes available then the flang script will be removed/renamed and flang-new will be renamed as flang.
I don’t know why the iso_c_binding usage is not working. I expected it to work. Maybe you can file a bug (Bug List).
Thanks for clarifying things about flang / flang-new.
I will make more tests about iso_c_binding and see if everything is correctly installed in my Fedora Rawhide.