Commit Graph

10524 Commits

Author SHA1 Message Date
Kajetan Puchalski
f12b1ed116 [flang][OpenMP] Add TODOs for target [teams|parallel] private (#143706)
Using the private clause on `target teams` or `target parallel` is not
currently implemented and causes crashes during lowering. Add
appropriate TODOs.

Resolves https://github.com/llvm/llvm-project/issues/116428.

Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
2025-06-12 16:35:36 +01:00
Kareem Ergawy
4bd0a0e50b Revert "[flang] Enable delayed localization by default for do concurrent (#142567)" (#143905)
This reverts commit 937be17752.

Resolves https://github.com/llvm/llvm-project/issues/143897 until the
todo is properly handled.
2025-06-12 17:09:55 +02:00
Kareem Ergawy
282e471018 [flang] Erase fir.local ops before lowering fir to llvm (#143687)
`fir.local` ops are not supposed to have any uses at this point (i.e.
during lowering to LLVM). In case of serialization, the
`fir.do_concurrent` users are expected to have been lowered to
`fir.do_loop` nests. In case of parallelization, the `fir.do_concurrent`
users are expected to have been lowered to the target parallel model
(e.g. OpenMP).

This hopefully resolved a build issue introduced by
https://github.com/llvm/llvm-project/pull/142567 (see for example:
https://lab.llvm.org/buildbot/#/builders/199/builds/4009).
2025-06-12 05:58:55 +02:00
Jameson Nash
082251bba4 [AArch64] fix trampoline implementation: use X15 (#126743)
AAPCS64 reserves any of X9-X15 for a compiler to choose to use for this
purpose, and says not to use X16 or X18 like GCC (and the previous
implementation) chose to use. The X18 register may need to get used by
the kernel in some circumstances, as specified by the platform ABI, so
it is generally an unwise choice. Simply choosing a different register
fixes the problem of this being broken on any platform that actually
follows the platform ABI (which is all of them except EABI, if I am
reading this linux kernel bug correctly
https://lkml2.uits.iu.edu/hypermail/linux/kernel/2001.2/01502.html). As
a side benefit, also generate slightly better code and avoids needing
the compiler-rt to be present. I did that by following the XCore
implementation instead of PPC (although in hindsight, following the
RISCV might have been slightly more readable). That X18 is wrong to use
for this purpose has been known for many years (e.g.
https://www.mail-archive.com/gcc@gcc.gnu.org/msg76934.html) and also
known that fixing this to use one of the correct registers is not an ABI
break, since this only appears inside of a translation unit. Some of the
other temporary registers (e.g. X9) are already reserved inside llvm for
internal use as a generic temporary register in the prologue before
saving registers, while X15 was already used in rare cases as a scratch
register in the prologue as well, so I felt that seemed the most logical
choice to choose here.
2025-06-11 21:49:01 -04:00
Peter Klausler
b42aef5e6f [flang] Don't duplicate hermetic module file dependencies (#143605)
When emitting the modules on which a module depends under the
-fhermetic-module-files options, eliminate duplicates by name rather
than by symbol addresses. This way, when a dependent module is in the
symbol table more than once due to the use of a nested hermetic module,
it doesn't get emitted multiple times to the new module file.
2025-06-11 13:12:59 -07:00
jeanPerier
621a7d0f66 [flang] silence bogus error with BIND(C) variable in hermetic module (#143737)
The global name semantic check was firing in a bogus way when BIND(C)
variables are in hermetic module.

Do not raise the error if one of the symbol with the conflicting global
name is an "hermetic variant" of the other.
2025-06-11 19:02:47 +02:00
Kazu Hirata
91be47dccf [flang] Fix warnings
This patch fixes:

  flang/lib/Lower/OpenMP/OpenMP.cpp:3904:9: error: unused variable
  'action0' [-Werror,-Wunused-variable]

  flang/lib/Lower/OpenMP/OpenMP.cpp:3905:9: error: unused variable
  'action1' [-Werror,-Wunused-variable]
2025-06-11 08:53:54 -07:00
Krzysztof Parzyszek
e64f8e043c [flang][Driver] Guard check for pic/pie settings without driver flags (#143530)
The default relocation model for clang depends on the cmake flag
CLANG_DEFAULT_PIE_ON_LINUX. By default it is set to ON, but when it's
OFF, the default relocation model will be "static".
The outcome of the test running clang without any PIC/PIE flags will
depend on the cmake flag, so make sure it only runs when the flag is ON.
2025-06-11 10:17:54 -05:00
Krzysztof Parzyszek
141d390dcb [flang][OpenMP] Overhaul implementation of ATOMIC construct (#137852)
The parser will accept a wide variety of illegal attempts at forming an
ATOMIC construct, leaving it to the semantic analysis to diagnose any
issues. This consolidates the analysis into one place and allows us to
produce more informative diagnostics.

The parser's outcome will be parser::OpenMPAtomicConstruct object
holding the directive, parser::Body, and an optional end-directive. The
prior variety of OmpAtomicXyz classes, as well as OmpAtomicClause have
been removed. READ, WRITE, etc. are now proper clauses.

The semantic analysis consistently operates on "evaluation"
representations, mainly evaluate::Expr (as SomeExpr) and
evaluate::Assignment. The results of the semantic analysis are stored in
a mutable member of the OpenMPAtomicConstruct node. This follows a
precedent of having `typedExpr` member in parser::Expr, for example.
This allows the lowering code to avoid duplicated handling of AST nodes.

Using a BLOCK construct containing multiple statements for an ATOMIC
construct that requires multiple statements is now allowed. In fact, any
nesting of such BLOCK constructs is allowed.

This implementation will parse, and perform semantic checks for both
conditional-update and conditional-update-capture, although no MLIR will
be generated for those. Instead, a TODO error will be issues prior to
lowering.

The allowed forms of the ATOMIC construct were based on the OpenMP 6.0
spec.
2025-06-11 10:05:34 -05:00
Peter Klausler
10f512f7bb Revert runtime work queue patch, it breaks some tests that need investigation (#143713)
Revert "[flang][runtime] Another try to fix build failure"

This reverts commit 13869cac2b5051e453aa96ad71220d9d33404620.

Revert "[flang][runtime] Fix build bot flang-runtime-cuda-gcc errors
(#143650)"

This reverts commit d75e28477a.

Revert "[flang][runtime] Replace recursion with iterative work queue
(#137727)"

This reverts commit 163c67ad3d.
2025-06-11 07:55:06 -07:00
Razvan Lupusoru
775ad3e49c [flang][acc] Ensure all acc.loop get a default parallelism determination mode (#143623)
This PR updates the flang lowering to explicitly implement the OpenACC
rules:
- As per OpenACC 3.3 standard section 2.9.6 independent clause: A loop
construct with no auto or seq clause is treated as if it has the
independent clause when it is an orphaned loop construct or its parent
compute construct is a parallel construct.
- As per OpenACC 3.3 standard section 2.9.7 auto clause: When the parent
compute construct is a kernels construct, a loop construct with no
independent or seq clause is treated as if it has the auto clause.
- Loops in serial regions are `seq` if they have no other parallelism
marking such as gang, worker, vector.

For now the `acc.loop` verifier has not yet been updated to enforce
this.
2025-06-11 07:16:58 -07:00
David Truby
46d9abbba2 [flang] Add David Truby as maintainer for Flang on Windows (#142619) 2025-06-11 14:50:39 +01:00
Kajetan Puchalski
cc9f67416d [flang][OpenMP] Consider previous DSA for static duration variables (#143601)
Symbols that have a pre-existing DSA set in the enclosing context should
not be made shared based on them being static duration variables.

Suggested-by: Leandro Lupori <leandro.lupori@linaro.org>

---------

Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
2025-06-11 14:30:02 +01:00
Kareem Ergawy
2dd88c405d [flang][OpenMP] Extend locality spec to OMP claues (init and dealloc regions) (#142795)
Extends support for locality specifier to OpenMP translation by adding
supprot for transling localizers that have `init` and `dealloc` regions.
2025-06-11 13:44:01 +02:00
Simone Pellegrini
abbbe4a6cd [mlir][vector] Fix attaching write effects on transfer_write's base (#142940)
This fixes an issue with `TransferWriteOp`'s implementation of the
`MemoryEffectOpInterface` where the write effect was attached to the
stored value rather than the base.

This had the effect that when asking for the memory effects for the
input memref buffer using `getEffectsOnValue(...)`, the function would
return no-effects (as the effect would have been attached to the stored
value rather than the input buffer).
2025-06-11 12:37:34 +01:00
Tom Eccles
7ffdf4240d [flang][Driver] Enable support for -mmacos-version-min= (#143508)
So far as I can tell this option is driver-only so we can just re-use
what already exists for clang. I've added a unit test based on clang's
unit test to demonstrate that the option is handled.

Still TODO is to ensure that flang-rt is built with the same macos
minimum version as compiler-rt. At the moment, setting the flang minimum
version to older than the macos version on which flang was built will
lead to link warnings because flangrt is built for version of macos on
which flang was built rather than the oldest supported version (as
compiler-rt is).
2025-06-11 10:21:07 +01:00
Kareem Ergawy
e44a65ed98 [flang][OpenMP] Map basic local specifiers to private clauses (#142735)
Starts the effort to map `do concurrent` locality specifiers to OpenMP
clauses. This PR adds support for basic specifiers (no `init` or `copy`
regions yet).
2025-06-11 10:36:12 +02:00
Kareem Ergawy
937be17752 [flang] Enable delayed localization by default for do concurrent (#142567)
This PR aims to make it easier and more self-contained to revert the
switch/flag if we discover any problems with enabling it by default.
2025-06-11 10:10:22 +02:00
Valentin Clement (バレンタイン クレメン)
a3201ce9e1 [flang][cuda] Add option to disable warp function in semantic (#143640)
These functions are not available in some lower compute capabilities.
Add option in the language feature to enforce the semantic check on
these.
2025-06-10 22:10:26 -07:00
Zhen Wang
48122a7977 [flang][cuda] Fix CUDA generic resolution for VALUE arguments in device procedures (#140952)
For actual arguments that have VALUE attribute inside device routines, treat them as if they have device attribute.
2025-06-10 16:15:12 -07:00
Peter Klausler
54e72d15bc [flang] Ensure overrides of special procedures (#142465)
When a derived type declares a generic procedure binding of interest to
the runtime library, such as for ASSIGNMENT(=), it overrides any binding
that might have been present for the parent type.

Fixes https://github.com/llvm/llvm-project/issues/142414.
2025-06-10 14:44:59 -07:00
Peter Klausler
b994a4c04f [flang][NFC] Clean up code in two new functions (#142037)
Two recently-added functions in Semantics/tools.h need some cleaning up
to conform to the coding style of the project. One of them should
actually be in Parser/tools.{h,cpp}, the other doesn't need to be
defined in the header.
2025-06-10 14:44:41 -07:00
Peter Klausler
163c67ad3d [flang][runtime] Replace recursion with iterative work queue (#137727)
Recursion, both direct and indirect, prevents accurate stack size
calculation at link time for GPU device code. Restructure these
recursive (often mutually so) routines in the Fortran runtime with new
implementations based on an iterative work queue with
suspendable/resumable work tickets: Assign, Initialize, initializeClone,
Finalize, and Destroy.

Default derived type I/O is also recursive, but already disabled. It can
be added to this new framework later if the overall approach succeeds.

Note that derived type FINAL subroutine calls, defined assignments, and
defined I/O procedures all perform callbacks into user code, which may
well reenter the runtime library. This kind of recursion is not handled
by this change, although it may be possible to do so in the future using
thread-local work queues.

The effects of this restructuring on CPU performance are yet to be
measured.
2025-06-10 14:44:19 -07:00
Pranav Bhandarkar
f993f362ef [Flang][OpenMP] - When mapping a fir.boxchar, map the underlying data pointer as a member (#141715)
This PR adds functionality to the `MapInfoFinalization` pass wherein the
underlying data pointer of a `fir.boxchar` is mapped as a member of the
parent boxchar.
2025-06-10 13:09:32 -05:00
Andre Kuhlenschmidt
d502c68dcb [flang][common] return ENUM_CLASS names definition to original state (#143553)
This PR simply reverts a few lines in
bf60aa1c55 to their state in
bcba39a56f so that they are constant for
some of the build tests that require it. This should fix the breakage
caused by #142022.
2025-06-10 09:21:20 -07:00
Dominik Adamski
007d29e30c [Flang] Turn on alias analysis for locally allocated objects (#143489)
Previously, a bug in the MemCptOpt LLVM IR pass caused issues with
adding alias tags for locally allocated objects for Fortran code.

However, the bug has now been fixed (https://github.com/llvm/llvm-project/pull/129537 ),
and we can safely enable alias tags for these objects. This change should
improve the accuracy of the alias analysis.

More accurate alias analysis assumes that Cray pointers do not alias
with other variables. This assumption is common among other compilers.
If the code violates this assumption, it can lead to incorrect results
(see: https://github.com/llvm/llvm-project/issues/141928)
2025-06-10 16:46:13 +02:00
Krzysztof Parzyszek
e295b0ce75 [flang][OpenMP] Fix detecting nested OpenMP constructs (#143383)
Recognize privatizing OpenMP constructs, and only exclude symbols from
non-privatizing ones.
2025-06-10 09:33:12 -05:00
Cameron McInally
cde1035a2f [flang] Add support for -mrecip[=<list>] (#143418)
This patch adds support for the -mrecip command line option. The parsing
of this options is equivalent to Clang's and it is implemented by
setting the "reciprocal-estimates" function attribute.

Also move the ParseMRecip(...) function to CommonArgs, so that Flang is
able to make use of it as well.

---------

Co-authored-by: Cameron McInally <cmcinally@nvidia.com>
2025-06-10 08:25:33 -06:00
Andre Kuhlenschmidt
bf60aa1c55 [flang][cli] Add diagnostic flags to the CLI (#142022)
This change allows the flang CLI to accept `-W[no-]<feature>` flags matching the clang syntax and enable and disable usage and language feature warnings.
2025-06-10 06:41:13 -07:00
Asher Mancinelli
535b24d107 [flang][openmp] Propagate volatile on reduction variables (#142435)
Reference types were being constructed from openmp private clauses without propagating volatility.
Fix this by checking the volatility of the original variable and add a test.
2025-06-10 06:13:49 -07:00
jeanPerier
59e4d0b34d [flang][hlfir] ensure hlfir.declare result box attributes are consistent (#143137)
Prevent hlfir.declare output to be fir.box/class values with the
heap/pointer attribute to ensure the runtime descriptor attributes are
in line with the Fortran attributes for the entities being declared
(only fir.ref<box/class> can be ALLOCATABLE/POINTERS).

This fixes a bug where an associated entity inside a SELECT TYPE was being
unexpectedly reallocated inside assign runtime because the selector was allocatable
and this attribute was not properly removed when creating the descriptor
for the associated entity (that does not inherit the ALLOCATABLE/POINTER
attribute according to Fortran 2023 section 11.1.3.3).
2025-06-10 14:41:14 +02:00
Q
823750d873 [flang][fir] Add fir.if -> scf.if and add filecheck test file (#142965)
This commmit is a supplement for
https://github.com/llvm/llvm-project/pull/140374.

RFC:https://discourse.llvm.org/t/rfc-add-fir-affine-optimization-fir-pass-pipeline/86190/6

---------

Co-authored-by: ZhiQiang Fan <zhiqiang.fan@terapines.com>
2025-06-10 15:43:24 +08:00
Jeremy Morse
0e4b8b8f81 [DebugInfo][RemoveDIs] Rip out the UseNewDbgInfoFormat flag (#143207)
Start removing debug intrinsics support -- starting with the flag that
controls production of their replacement, debug records. This patch
removes the command-line-flag and with it the ability to switch back to
intrinsics. The module / function / block level "IsNewDbgInfoFormat"
flags get hardcoded to true, I'll to incrementally remove things that
depend on those flags.
2025-06-09 19:36:34 +01:00
Kajetan Puchalski
18f8e23815 [flang][OpenMP] Make static duration variables default to shared DSA (#142783)
According to the OpenMP standard, variables with static storage duration
are predetermined as shared.
Add a check when creating implicit symbols for OpenMP to fix them
erroneously getting set to firstprivate.

Fixes llvm#140732.

---------

Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
2025-06-09 15:52:24 +01:00
Tom Eccles
ce603a0f16 [flang][openmp]Add UserReductionDetails and use in DECLARE REDUCTION (#140066)
This adds another puzzle piece for the support of OpenMP DECLARE
REDUCTION functionality.

This adds support for operators with derived types, as well as declaring
multiple different types with the same name or operator.

A new detail class for UserReductionDetials is introduced to hold the
list of types supported for a given reduction declaration.

Tests for parsing and symbol generation added.

Declare reduction is still not supported to lowering, it will generate a
"Not yet implemented" fatal error.

Fixes #141306
Fixes #97241
Fixes #92832
Fixes #66453

---------

Co-authored-by: Mats Petersson <mats.petersson@arm.com>
2025-06-09 11:17:03 +01:00
Michał Górny
23d0c7348a [flang] Fix missing includes in lib/Lower/Support/Utils.cpp (#143196)
Fixes the build failure due to missing includes introduced in
f8dcb059ae.
2025-06-07 15:39:42 +02:00
Cameron McInally
a42bb8b57a [Driver] Move CommonArgs to a location visible by the Frontend Drivers (#142800)
This patch moves the CommonArgs utilities into a location visible by the
Frontend Drivers, so that the Frontend Drivers may share option parsing
code with the Compiler Driver. This is useful when the Frontend Drivers
would like to verify that their incoming options are well-formed and
also not reinvent the option parsing wheel.

We already see code in the Clang/Flang Drivers that is parsing and
verifying its incoming options. E.g. OPT_ffp_contract. This option is
parsed in the Compiler Driver, Clang Driver, and Flang Driver, all with
slightly different parsing code. It would be nice if the Frontend
Drivers were not required to duplicate this Compiler Driver code. That
way there is no/low maintenance burden on keeping all these parsing
functions in sync.

Along those lines, the Frontend Drivers will now have a useful mechanism
to verify their incoming options are well-formed. Currently, the
Frontend Drivers trust that the Compiler Driver is not passing back junk
in some cases. The Language Drivers may even accept junk with no error
at all. E.g.:

  `clang -cc1 -mprefer-vector-width=junk test.c'

With this patch, we'll now be able to tighten up incomming options to
the Frontend drivers in a lightweight way.

---------

Co-authored-by: Cameron McInally <cmcinally@nvidia.com>
Co-authored-by: Shafik Yaghmour <shafik.yaghmour@intel.com>
2025-06-06 17:59:24 -04:00
Slava Zakharin
ba8077c9dd [flang] Use optimal shape for assign expansion as a loop. (#143050)
During `hlfir.assign` inlining and `ElementalAssignBufferization`
we can deduce the optimal shape from `lhs` and `rhs` shapes.
It is probably better be done in a separate pass that propagates
constant shapes, but I have not seen any benchmarks that would
benefit from this yet. So consider this as a workaround for a bigger
TODO issue.

The `ElementalAssignBufferization` case is from 465.tonto,
but I do not have performance results yet (I do not expect much).
2025-06-06 10:45:38 -07:00
Slava Zakharin
e16f603351 [flang] Relax conflicts detection in ElementalAssignBufferization. (#143045)
If there is a read-effect operation inside `hlfir.elemental`,
there is no reason to block moving it to the assignment point
unless there are write-effect operations between the elemental
and the assignment. The previous code was disallowing the optimization
even if there were only read-effect operations in between.

This case is from 465.tonto, though this change does not improve
performance at all.
2025-06-06 10:45:26 -07:00
Pranav Bhandarkar
8395912895 [Flang] - Handle BoxCharType in fir.box_offset op (#141713)
To map `fir.boxchar` types reliably onto an offload target, such as a
GPU, the `omp.map.info` operation is used to map the underlying data
pointer (`fir.ref<fir.char<k, ?>>`) wrapped by the `fir.boxchar` MLIR
value. The `omp.map.info` operation needs a pointer to the underlying
data pointer.
Given a reference to a descriptor (`fir.box`), the `fir.box_offset` is
used to obtain the address of the underlying data pointer. This PR
extends `fir.box_offset` to provide the same functionality for
`fir.boxchar` as well.
2025-06-06 10:48:07 -05:00
Kajetan Puchalski
0d40574e16 [flang] Inline hlfir.copy_in for trivial types (#138718)
hlfir.copy_in implements copying non-contiguous array slices for
functions that take in arrays required to be contiguous through
flang-rt.

For large arrays of trivial types, this can incur overhead compared to a
plain, inlined copy loop.

To address that, add a new InlineHLFIRCopyIn optimisation pass to inline
hlfir.copy_in operations for trivial types.

For the time being, the pattern is only applied in cases where the
copy-in does not require a corresponding copy-out, such as when the
function being called declares the array parameter as intent(in).

Applying this optimisation reduces the runtime of thornado-mini's
DeleptonizationProblem by about 10%.

---------

Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
2025-06-06 15:10:17 +01:00
jeanPerier
6a41f53c39 [flang][hlfir] do not propagate polymorphic temporary as allocatables (#142609)
Polymorphic temporary are currently propagated as
fir.ref<fir.class<fir.heap<>>> because their allocation may be delayed
to the hlfir.assign copy (using realloc).

This patch moves away from this and directly allocate the temp and
propagate it as a fir.class.

The polymorphic temporaries creating is also simplified by avoiding the
need to call the runtime to setup the descriptor altogether (the runtime
is still call for the allocation currently because alloca/allocmem do
not support polymorphism).
2025-06-06 09:53:41 +02:00
Kajetan Puchalski
b6521e8bb9 [flang][OpenMP] Show error for task depend with no valid modifiers (#142595)
If a "TASK DEPEND" clause is not given a valid task dependece type
modifier, the semantic checks for the clause will result in an ICE
because they assume that such modifiers will be present. Check whether
the modifiers are present and show an appropriate error instead of
crashing the compiler if they are not.

Fixes llvm#133678.

Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
2025-06-05 12:00:29 +01:00
Kareem Ergawy
bac4aa440c [flang] Extend localization support for do concurrent (init regions) (#142564)
Extends support for locality specifiers in `do concurrent` by supporting
data types that need `init` regions.

This further unifies the paths taken by the compiler for OpenMP
privatization clauses and `do concurrent` locality specifiers.
2025-06-05 01:01:53 +02:00
Samarth Narang
47171ac3f9 [Flang] Add Sphinx man page and html support for Flang (#141882)
This patch refactors the Flang documentation CMake and Sphinx
configuration to address build issues.

**CMake changes**:

- Moves the `gen_rst_file_from_td()` call out of the HTML-only block so
that both `docs-flang-html` and `docs-flang-man` builds depend on the
generated `FlangCommandLineReference.rst` file.

**conf.py changes**:
- Introduces `myst_parser` dependency as a required Markdown parser for
both HTML and man builds.
- Introduces the correct source_suffix mapping for both .rst and .md
files.
- Populates the man_pages configuration so the main index page generates
a ` flang(1) `man page.

Fixes #141757

---------

Authored-by: Samarth Narang <samanara@qti.qualcomm.com>
2025-06-04 22:24:42 +01:00
Peter Klausler
4b23d4c7ca [flang] Extension: allow override of inaccessible DEFERRED binding (#142691)
Inaccessible procedure bindings can't be overridden, but DEFERRED
bindings must be in a non-abstract extension. We presently emit an error
for an attempt to override an inaccessible binding in this case. But
some compilers accept this usage, and since it seems safe enough, I'll
allow it with an optional warning. Codes can avoid this warning and
conform to the standard by changing the deferred bindings to be public.
2025-06-04 09:23:34 -07:00
Peter Klausler
43abd252db [flang] Fix corner case of defined component assignment (#142201)
For componentwise assignment in derived type intrinsic assignment, the
runtime type information's special binding table is currently populated
only with type-bound ASSIGNMENT(=) procedures that have the same derived
type for both arguments. This restriction excludes all defined
assignments for cases that cannot arise in this context, like defined
assignments from intrinsic types or incompatible derived types.

However, this restriction also excludes defined assignments from
distinct but compatible derived types, i.e. ancestors. Loosen it a
little to allow them.

Fixes https://github.com/llvm/llvm-project/issues/142151.
2025-06-04 09:22:58 -07:00
Peter Klausler
f521338024 [flang] Correct defined assignment case (#142020)
When a generic ASSIGNMENT(=) has elemental and non-elemental specific
procedures that match the actual arguments, the non-elemental procedure
must take precedence. We get this right for generics defined with
interface blocks, but the type-bound case fails if the non-elemental
specific takes a non-default PASS argument.

Fixes https://github.com/llvm/llvm-project/issues/141807.
2025-06-04 09:22:28 -07:00
David Truby
b59c88835f [flang] Add aarch64 processor defines (#142606)
This patch adds aarch64 specific processor defines when targeting
aarch64, similar to the ones for ppc64 and x86_64
2025-06-04 14:42:23 +01:00
Kajetan Puchalski
11d8454626 [flang][OpenMP] Skip implicit typing for OpenMPDeclarativeConstruct (#142415)
DeclareSimdConstruct (and other declarative constructs) can currently
implicitly declare variables regardless of whether the source code
contains "implicit none" or not. This causes semantic analysis issues if
the implicit type does not match the declared type. To solve it, skip
implicit typing for OpenMPDeclarativeConstruct. Fixes issue #140754.

---------

Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
2025-06-04 14:18:26 +01:00