2023-01-29 10:09:16 +01:00
|
|
|
# Flang |version| (In-Progress) Release Notes
|
2020-09-03 11:44:03 +01:00
|
|
|
|
|
|
|
> **warning**
|
|
|
|
>
|
2023-01-29 10:09:16 +01:00
|
|
|
> These are in-progress notes for the upcoming LLVM |version| release.
|
2020-09-03 11:44:03 +01:00
|
|
|
> Release notes for previous releases can be found on [the Download
|
|
|
|
> Page](https://releases.llvm.org/download.html).
|
|
|
|
|
|
|
|
## Introduction
|
|
|
|
|
|
|
|
This document contains the release notes for the Flang Fortran frontend,
|
2023-01-29 10:09:16 +01:00
|
|
|
part of the LLVM Compiler Infrastructure, release |version|. Here we
|
2020-09-03 11:44:03 +01:00
|
|
|
describe the status of Flang in some detail, including major
|
|
|
|
improvements from the previous release and new feature work. For the
|
|
|
|
general LLVM release notes, see [the LLVM
|
|
|
|
documentation](https://llvm.org/docs/ReleaseNotes.html). All LLVM
|
|
|
|
releases may be downloaded from the [LLVM releases web
|
|
|
|
site](https://llvm.org/releases/).
|
|
|
|
|
|
|
|
Note that if you are reading this file from a Git checkout, this
|
|
|
|
document applies to the *next* release, not the current one. To see the
|
|
|
|
release notes for a specific release, please see the [releases
|
|
|
|
page](https://llvm.org/releases/).
|
|
|
|
|
2022-06-06 10:03:21 +00:00
|
|
|
## Major New Features
|
2020-09-03 11:44:03 +01:00
|
|
|
|
2022-11-10 07:56:03 -07:00
|
|
|
* Flang now supports loading LLVM pass plugins with the `-fpass-plugin` option
|
|
|
|
which is also available in clang. The option mimics the behavior of the
|
|
|
|
corresponding option in clang and has the same capabilities and limitations.
|
2022-11-10 14:09:51 -08:00
|
|
|
* Flang also supports statically linked LLVM pass extensions. Projects can be
|
|
|
|
linked statically into `flang-new` if the cmake command includes
|
|
|
|
`-DLLVM_${NAME}_LINK_INTO_TOOLS=ON`. This behavior is also similar to clang.
|
2022-11-10 07:56:03 -07:00
|
|
|
|
2022-06-06 10:03:21 +00:00
|
|
|
## Bug Fixes
|
2020-09-03 11:44:03 +01:00
|
|
|
|
2022-06-06 10:03:21 +00:00
|
|
|
## Non-comprehensive list of changes in this release
|
|
|
|
* The bash wrapper script, `flang`, is renamed as `flang-to-external-fc`.
|
2022-06-22 10:29:57 +00:00
|
|
|
* In contrast to Clang, Flang will not default to using `-fpie` when linking
|
|
|
|
executables. This is only a temporary solution and the goal is to align with
|
|
|
|
Clang in the near future. First, however, the frontend driver needs to be
|
|
|
|
extended so that it can generate position independent code (that requires
|
|
|
|
adding support for e.g. `-fpic` and `-mrelocation-model` in `flang-new
|
|
|
|
-fc1`). Once that is available, support for the `-fpie` can officially be
|
|
|
|
added and the default behaviour updated.
|
2020-09-03 11:44:03 +01:00
|
|
|
|
2022-06-06 10:03:21 +00:00
|
|
|
## New Compiler Flags
|
2022-06-23 09:29:12 +00:00
|
|
|
* Refined how `-f{no-}color-diagnostics` is treated to better align with Clang.
|
|
|
|
In particular, both `-fcolor-diagnostics` and `-fno-color-diagnostics` are
|
|
|
|
now available in `flang-new` (the diagnostics are formatted by default). In
|
|
|
|
the frontend driver, `flang-new -fc1`, only `-fcolor-diagnostics` is
|
[flang] Support the color diagnostics on scanning, parsing, and semantics
The options -f{no-}color-diagnostics have been supported in driver. This
supports the behaviors in scanning, parsing, and semantics, and the
behaviors are exactly the same as the driver.
To illustrate the added behaviour, consider the following input file:
```! file.f90
program m
integer :: i = k
end
```
In the following invocations, "error: Must be a constant value" _will be_
formatted:
```
$ flang-new file.f90
error: Semantic errors in file.f90
./file.f90:2:18: error: Must be a constant value
integer :: i = k
```
Note that "error: Semantic errors in file.f90" is also formatted, which
is supported in https://reviews.llvm.org/D126164.
Also note that only "error", "warning" and "portability" are formatted.
Check the following input file:
```! file2.f90
program m
integer :: i =
end
```
```
$ flang-new test2.f90
error: Could not parse test2.f90
./test2.f90:2:11: error: expected '('
integer :: i =
^
./test2.f90:2:3: in the context: statement function definition
integer :: i =
^
...
```
The "error: Could not parse test2.f90" and "error: expected '('" are
formatted. Others such as "in the context" are not formatted yet, which
may or may not be supported.
Reviewed By: awarzynski
Differential Revision: https://reviews.llvm.org/D126166
2022-07-27 23:45:41 +08:00
|
|
|
available (by default, the diagnostics are not formatted).
|
2020-09-03 11:44:03 +01:00
|
|
|
|
2022-06-06 10:03:21 +00:00
|
|
|
## Windows Support
|
2020-09-03 11:44:03 +01:00
|
|
|
|
2022-06-06 10:03:21 +00:00
|
|
|
## Fortran Language Changes in Flang
|
2020-09-03 11:44:03 +01:00
|
|
|
|
2022-06-06 10:03:21 +00:00
|
|
|
## Build System Changes
|
2020-09-03 11:44:03 +01:00
|
|
|
|
2022-06-06 10:03:21 +00:00
|
|
|
## New Issues Found
|
2020-09-03 11:44:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
## Additional Information
|
|
|
|
|
|
|
|
Flang's documentation is located in the `flang/docs/` directory in the
|
|
|
|
LLVM monorepo.
|
|
|
|
|
|
|
|
If you have any questions or comments about Flang, please feel free to
|
2022-07-28 16:54:38 -07:00
|
|
|
contact us on the [Discourse
|
|
|
|
forums](https://discourse.llvm.org/c/subprojects/flang/33).
|