flang
flang copied to clipboard
difference between flang and f18?
For me there is a lot of confusion to me about f18 compiler and flang, whether this is actually the same thing. When I use f18 things are definitively even more broken (more unreasonable error messages) than with flang. I understand it is under development, but it may be useful to know what is the difference between the two.
This project (flang-compiler/flang, also called classic flang) is an open sourced version of the pgfortran compiler from PGI/Nvidia. It was made first available in 2017. The codebase is a bit old. Development continues in this repository but no major new features are planned. Plan is to replace with the new f18 compiler which is under development. The f18 compiler is also the Fortran frontend of LLVM.
@kiranchandramohan Thanks for your patient explanation.
I am trying to identify where to send bug report about what I thought was the LLVM fortran interface. I am using Fedora (version 34 beta 1) where this seems to be sort of similar.
~>flang -h
f18: LLVM Fortran compiler
Usage: f18 [options] <input files>
...
~>f18 -h
f18: LLVM Fortran compiler
Usage: f18 [options] <input files>
...
~>head `which flang`
#!/usr/bin/bash
#===-- tools/f18/flang.sh -----------------------------------------*- sh -*-===#
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
#===------------------------------------------------------------------------===#
except that in my makefile, usingflang almost works where as directly using f18 completely breaks things.
Now I need to find the correct repo then.
If you want to file a bug on f18 (llvm/flang), please do so at bugzilla. https://bugs.llvm.org/describecomponents.cgi?product=flang
I think the flang.sh script sets up the module directories whereas with f18 binary you might have to set that yourself. But this might have been fixed recently (https://reviews.llvm.org/D99336). Did you install flang yourself or did you use the one that comes with Fedora? If the latter then it might be because you are using an old version.
yes, it is the one that comes by with the new Fedora 34 still in beta. (which is why I installed F34b1 one in a VM)
[root@u ~]# dnf list flang
Last metadata expiration check: 2:11:55 ago on Sun 04 Apr 2021 06:20:38.
Installed Packages
flang.x86_64 12.0.0-0.1.rc1.fc34 @updates-testing
but it may not have the patch you linked to yet included. (... need to wait to get account on bugzilla)
If you use slack then there is a slack channel for classic flang and f18. See details in link below. http://flang.llvm.org/docs/GettingInvolved.html#flang-slack-workspace