History log of /llvm-project/flang/lib/Semantics/resolve-names.cpp (Results 1 – 25 of 410)
Revision Date Author Comments
# e811cb00 29-Jan-2025 Jean-Didier PAILLEUX <jean-di.pailleux@outlook.com>

[flang] Implement !DIR$ UNROLL [N] (#123331)

This patch implements support for the UNROLL directive to control how
many times a loop should be unrolled.
It must be placed immediately before a `DO

[flang] Implement !DIR$ UNROLL [N] (#123331)

This patch implements support for the UNROLL directive to control how
many times a loop should be unrolled.
It must be placed immediately before a `DO LOOP` and applies only to the
loop that follows. N is an integer that specifying the unrolling factor.
This is done by adding an attribute to the branch into the loop in LLVM
to indicate that the loop should unrolled.
The code pushed to support the directive `VECTOR ALWAYS` has been
modified to take account of the fact that several directives can be used
before a `DO LOOP`.

show more ...


# 3ac00784 27-Jan-2025 Peter Klausler <pklausler@nvidia.com>

[flang] Fix crash on erroneous program (#123843)

Catch and report multiple initializations of the same procedure pointer
rather than assuming that control wouldn't reach a given point in name
reso

[flang] Fix crash on erroneous program (#123843)

Catch and report multiple initializations of the same procedure pointer
rather than assuming that control wouldn't reach a given point in name
resolution in that case.

Fixes https://github.com/llvm/llvm-project/issues/123538.

show more ...


# 038b42ba 27-Jan-2025 Peter Klausler <pklausler@nvidia.com>

[flang] Safer hermetic module file reading (#121002)

When a hermetic module file is read, use a new scope to hold its
dependent modules so that they don't conflict with any modules in the
global s

[flang] Safer hermetic module file reading (#121002)

When a hermetic module file is read, use a new scope to hold its
dependent modules so that they don't conflict with any modules in the
global scope.

show more ...


# 712359da 21-Jan-2025 agozillon <Andrew.Gozillon@amd.com>

[Flang] Fix -werror from recent resolve-names.cpp changes, left over unused variable


# 8f5df889 21-Jan-2025 agozillon <Andrew.Gozillon@amd.com>

[Flang][Semantics] Allow declare target to be used on functions external to the declare targets scope (#122546)

Whilst a little contrived, OpenMP allows you to utilise declare target
in the scope o

[Flang][Semantics] Allow declare target to be used on functions external to the declare targets scope (#122546)

Whilst a little contrived, OpenMP allows you to utilise declare target
in the scope of one function to mark another function declare target,
currently this leads to a semantic error.

This appears to be because when we process the declare target directive
in the scope of another function (referring to another function), we do
not search externally from that functions scope to find possible prior
definitions, we only search in the current scope, this leads to us
implicitly defining a new variable and using that when implicit none is
not specified and then error'ng out or error'ng out earlier when implict
none is defined. This patch tries to address this behaviour by looking
externally for a function first and using that, before defaulting back
to the prior behaviour.

show more ...


# 9f0f54a6 14-Jan-2025 Peter Klausler <pklausler@nvidia.com>

[flang] Improve error messages for module self-USE (#122747)

A module can't USE itself, either directly within the top-level module
or from one of its submodules. Add a test for this case (which we

[flang] Improve error messages for module self-USE (#122747)

A module can't USE itself, either directly within the top-level module
or from one of its submodules. Add a test for this case (which we
already caught), and improve the diagnostic for the more confusing case
involving a submodule.

show more ...


# 6f55c806 14-Jan-2025 Peter Klausler <pklausler@nvidia.com>

[flang] Fix crash in fuzzer-generated error test. (#122199)

Fixes https://github.com/llvm/llvm-project/issues/121973.


# c701c18b 14-Jan-2025 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Move interface to __cuda_device (#122771)


# c189df84 10-Jan-2025 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Fix resolution of overloaded operator (#122402)


# 9462ce88 08-Jan-2025 Peter Klausler <pklausler@nvidia.com>

[flang] Fix crash when handling benign USE conflict (#121977)

When the same name is used for distinct derived types in two modules,
and at least one of those modules also defines a generic interfac

[flang] Fix crash when handling benign USE conflict (#121977)

When the same name is used for distinct derived types in two modules,
and at least one of those modules also defines a generic interface of
the same name, name resolution crashes when both modules are USE'd into
the same scope. The crash is due to some pointers into the symbol table
becoming invalid when a symbol is replaced with a UseErrorDetails; set
them to null. Also allow for extending a UseErrorDetails in place rather
than emitting a spurious error message.

Fixes https://github.com/llvm/llvm-project/issues/121718.

show more ...


# fc97d2e6 18-Dec-2024 Peter Klausler <pklausler@nvidia.com>

[flang] Add UNSIGNED (#113504)

Implement the UNSIGNED extension type and operations under control of a
language feature flag (-funsigned).

This is nearly identical to the UNSIGNED feature that h

[flang] Add UNSIGNED (#113504)

Implement the UNSIGNED extension type and operations under control of a
language feature flag (-funsigned).

This is nearly identical to the UNSIGNED feature that has been available
in Sun Fortran for years, and now implemented in GNU Fortran for
gfortran 15, and proposed for ISO standardization in J3/24-116.txt.

See the new documentation for details; but in short, this is C's
unsigned type, with guaranteed modular arithmetic for +, -, and *, and
the related transformational intrinsic functions SUM & al.

show more ...


# bbeafe4b 17-Dec-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Apply implict data attribute to local arrays (#120293)

Add the implicit data attribute to local arrays that don't have one.
This simplifies the host array detection in semantic.


# 1345ee42 13-Dec-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Do not apply implicit data attribute on dummy arg with VALUE (#119927)

Dummy arguments with the VALUE attribute do not need the implicit data
attribute.


# 3273d0bb 13-Dec-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Apply implicit data attribute only in device context (#119919)

Fix the condition so the implicit device data attribute is not applied
when the routine has `attribute(host)`


# 71418379 12-Dec-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Implicitly add DEVICE attribute in device/global functions (#119743)

Variables in global and device function/subroutine that have no CUDA
Fortran data attribute are implicitly DEVICE.


# 52755ac2 25-Nov-2024 Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

[flang][OpenMP] Use new modifier infrastructure for MAP/FROM/TO clauses (#117447)

This removes the specialized parsers and helper classes for these
clauses, namely ConcatSeparated, MapModifiers, an

[flang][OpenMP] Use new modifier infrastructure for MAP/FROM/TO clauses (#117447)

This removes the specialized parsers and helper classes for these
clauses, namely ConcatSeparated, MapModifiers, and MotionModifiers. Map
and the motion clauses are now handled in the same way as all other
clauses with modifiers, with one exception: the commas separating their
modifiers are optional. This syntax is deprecated in OpenMP 5.2.

Implement version checks for modifiers: for a given modifier on a given
clause, check if that modifier is allowed on this clause in the
specified OpenMP version. This replaced several individual checks.

Add a testcase for handling map modifiers in a different order, and for
diagnosing an ultimate modifier out of position.

show more ...


# 92604d7c 20-Nov-2024 Mats Petersson <mats.petersson@arm.com>

[flang][OpenMP]Add parsing support for MAP(MAPPER(name) ...) (#116274)

This prepares for using the DECLARE MAPPER construct.

A check in lowering will say "Not implemented" when trying to use a
m

[flang][OpenMP]Add parsing support for MAP(MAPPER(name) ...) (#116274)

This prepares for using the DECLARE MAPPER construct.

A check in lowering will say "Not implemented" when trying to use a
mapper as some code is required to tie the mapper to the declared one.

Senantics check for the symbol generated.

show more ...


# d68332d0 14-Nov-2024 Peter Klausler <pklausler@nvidia.com>

[flang] Fix spurious error messages due to INTRINSIC nested in BLOCK (#115889)

When skimmming executable parts to collect names used in procedure
calls, it is important to exclude names that have l

[flang] Fix spurious error messages due to INTRINSIC nested in BLOCK (#115889)

When skimmming executable parts to collect names used in procedure
calls, it is important to exclude names that have local declarations in
nested BLOCK constructs. The mechanism for handling these nested
declarations was catching only names whose declarations include an
"entity-decl", and so names appearing in other declaration statements
(like INTRINSIC and EXTERNAL statements) were not hidden from the scan,
leading to absurd error messages when such names turn out to be
procedures in the nested BLOCK construct but to not be procedures
outside it.

This patch fixes the code that detects local declarations in BLOCK for
all of the missed cases that don't use entity-decls; only INTRINSIC and
EXTERNAL could affect the procedures whose names are of interest to the
executable part skimmer, but perhaps future work will want to collect
non-procedures as well, so I plugged all of the holes that I could find.

Fixes https://github.com/llvm/llvm-project/issues/115674.

show more ...


# ec1e0c5e 14-Nov-2024 Mats Petersson <mats.petersson@arm.com>

[Flang][OMP]Add support for DECLARE MAPPER parsing and semantics (#115160)

Will hit a TODO in the lowering, which there are tests added to check
for this happening.


# c478aab6 30-Oct-2024 Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

[flang][OpenMP] Parser support for DEPOBJ plus DEPEND, DESTROY, UPDATE (#114074)

Parse the DEPOBJ construct and the associated clauses, perform basic
semantic checks.


# 973fa983 23-Oct-2024 Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

[flang][OpenMP] Parse iterators, add to MAP clause, TODO for lowering (#113167)

Define `OmpIteratorSpecifier` and `OmpIteratorModifier` parser classes,
and add parsing for them. Those are reusable

[flang][OpenMP] Parse iterators, add to MAP clause, TODO for lowering (#113167)

Define `OmpIteratorSpecifier` and `OmpIteratorModifier` parser classes,
and add parsing for them. Those are reusable between any clauses that
use iterator modifiers.

Add support for iterator modifiers to the MAP clause up to lowering,
where a TODO message is emitted.

show more ...


# 9b49392d 21-Oct-2024 Thirumalai Shaktivel <74826228+Thirumalai-Shaktivel@users.noreply.github.com>

[Flang] Handle the source (scopes) for some OpenMP constructs (#109097)

Fixes: https://github.com/llvm/llvm-project/issues/82943
Fixes: https://github.com/llvm/llvm-project/issues/82942
Fixes: htt

[Flang] Handle the source (scopes) for some OpenMP constructs (#109097)

Fixes: https://github.com/llvm/llvm-project/issues/82943
Fixes: https://github.com/llvm/llvm-project/issues/82942
Fixes: https://github.com/llvm/llvm-project/issues/85593

show more ...


# a1ac5a57 17-Oct-2024 Leandro Lupori <leandro.lupori@linaro.org>

[flang] Allow OpenMP declarations before type declarations (#112414)

Skip resolving implicit types for OpenMP declarative directives, to
allow them to appear before type declarations, which is supp

[flang] Allow OpenMP declarations before type declarations (#112414)

Skip resolving implicit types for OpenMP declarative directives, to
allow them to appear before type declarations, which is supported
by several compilers. This was discussed in

https://discourse.llvm.org/t/rfc-openmp-should-type-declaration-be-allowed-after-threadprivate/81345.

This fixes the semantic errors of
https://github.com/llvm/llvm-project/issues/106021.

show more ...


# 4f2b65fb 10-Oct-2024 Peter Klausler <pklausler@nvidia.com>

[flang] Fix references to destroyed objects (#111582)

ProgramTree instances are created as the value of a local variable in
the Pre(const parser::ProgramUnit &) member function in name resolution.

[flang] Fix references to destroyed objects (#111582)

ProgramTree instances are created as the value of a local variable in
the Pre(const parser::ProgramUnit &) member function in name resolution.
But references to these ProgramTree instances can persist in
SubprogramNameDetails symbol table entries that might survive that
function call's lifetime, and lead to trouble later when (e.g.)
expression semantics needs to deal with a possible forward reference in
a function reference in an expression being processed later in
expression checking.

So put those ProgramTree instances into a longer-lived linked list
within the SemanticsContext.

Might fix some weird crashes reported on big-endian targets (AIX &
Solaris).

show more ...


# 0f973ac7 02-Oct-2024 Peter Klausler <pklausler@nvidia.com>

[flang] Tag warnings with LanguageFeature or UsageWarning (#110304)

(This is a big patch, but it's nearly an NFC. No test results have
changed and all Fortran tests in the LLVM test suites work as

[flang] Tag warnings with LanguageFeature or UsageWarning (#110304)

(This is a big patch, but it's nearly an NFC. No test results have
changed and all Fortran tests in the LLVM test suites work as expected.)

Allow a parser::Message for a warning to be marked with the
common::LanguageFeature or common::UsageWarning that controls it. This
will allow a later patch to add hooks whereby a driver will be able to
decorate warning messages with the names of its options that enable each
particular warning, and to add hooks whereby a driver can map those
enumerators by name to command-line options that enable/disable the
language feature and enable/disable the messages.

The default settings in the constructor for LanguageFeatureControl were
moved from its header file into its C++ source file.

Hooks for a driver to use to map the name of a feature or warning to its
enumerator were also added.

To simplify the tagging of warnings with their corresponding language
feature or usage warning, to ensure that they are properly controlled by
ShouldWarn(), and to ensure that warnings never issue at code sites in
module files, two new Warn() member function templates were added to
SemanticsContext and other contextual frameworks. Warn() can't be used
before source locations can be mapped to scopes, but the bulk of
existing code blocks testing ShouldWarn() and FindModuleFile() before
calling Say() were convertible into calls to Warn(). The ones that were
not convertible were extended with explicit calls to
Message::set_languageFeature() and set_usageWarning().

show more ...


12345678910>>...17