#
caa0a269 |
| 03-Jun-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang] Add warnings about undefinable actuals for ASYNCHRONOUS/VOLAT… (#93851)
…ILE dummies
There's language in the standard (F'2023 15.5.2.5 p21) disallowing an
actual argument with a vector s
[flang] Add warnings about undefinable actuals for ASYNCHRONOUS/VOLAT… (#93851)
…ILE dummies
There's language in the standard (F'2023 15.5.2.5 p21) disallowing an
actual argument with a vector subscript from associating with a dummy
argument with either the ASYNCHRONOUS or VOLATILE attributes. This is a
bug in the standard, as (1) these attributes are actually relevant only
over the scope of the called procedure, (2) they can be applied in
nested scopes (internal subprograms and BLOCK) within the called
procedure, and (3) can be implicit within the called procedure and its
nested scopes in the case of ASYNCHRONOUS as a side effect of using a
dummy argument in an asynchronous data transfer statement. So issue a
warning. This new warning about undefinable actual arguments being
associated with ASYNCHRONOUS and VOLATILE dummy arguments subsumes an
existing warning about passing a constant actual to a VOLATILE dummy.
Resolves https://github.com/llvm/llvm-project/issues/93600.
show more ...
|
#
930c2d91 |
| 03-Jun-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang] Adjust %REF/%VAL semantic checking (#93718)
In accordance with other compilers, don't require that a %REF() actual
argument be a modifiable variable. And move the %REF/%VAL semantic
checks
[flang] Adjust %REF/%VAL semantic checking (#93718)
In accordance with other compilers, don't require that a %REF() actual
argument be a modifiable variable. And move the %REF/%VAL semantic
checks to Semantics/check-call.cpp, where one would expect to find them.
Fixes https://github.com/llvm/llvm-project/issues/93489.
show more ...
|
#
b8b90c2a |
| 24-May-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang] Silence bogus error about NULL() actual for assumed-rank dummy (#93225)
A NULL(without MOLD=) actual argument can be associated with an OPTIONAL
assumed-rank non-allocatable non-pointer dum
[flang] Silence bogus error about NULL() actual for assumed-rank dummy (#93225)
A NULL(without MOLD=) actual argument can be associated with an OPTIONAL
assumed-rank non-allocatable non-pointer dummy argument; it simply
signifies that the corresponding actual argument is absent, and thus
none of its dynamic attributes, including rank, are meaningful.
show more ...
|
#
dc78329d |
| 23-May-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang] Extension: associating polymorphic pointer/allocatable actual… (#93211)
… with monomorphic dummy
The relevant standard requires (F'2023 15.5.2.6 p2) that when a pointer
or allocatable ac
[flang] Extension: associating polymorphic pointer/allocatable actual… (#93211)
… with monomorphic dummy
The relevant standard requires (F'2023 15.5.2.6 p2) that when a pointer
or allocatable actual argument is associated with an
identically-attributed dummy argument, either both are polymorphic or
neither is. We already relax this requirement in the case of an
INTENT(IN) dummy argument, since a change of type cannot occur. Further,
like other compilers do, we can also relax this requirement in the case
of a limited polymorphic actual argument being associated with a
monomorphic dummy, as our implementation always passes a reference to
the actual descriptor, where any change of type that occurs during the
call due to reallocation will be properly recorded.
show more ...
|
#
e8eb52d1 |
| 13-May-2024 |
Valentin Clement (バレンタイン クレメン) <clementval@gmail.com> |
[flang][cuda] Extends matching distance computation (#91810)
Extends the computation of the matching distance in the generic
resolution to support options described in the table:
https://docs.nvid
[flang][cuda] Extends matching distance computation (#91810)
Extends the computation of the matching distance in the generic
resolution to support options described in the table:
https://docs.nvidia.com/hpc-sdk/archive/24.3/compilers/cuda-fortran-prog-guide/index.html#cfref-var-attr-unified-data
Options are added as language features in the `SemanticsContext` and a
flag is added in bbc for testing purpose.
show more ...
|
#
505f6da1 |
| 01-May-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang] Ensure all warning/portability messages are guarded by Should… (#90518)
…Warn()
Many warning messages were being emitted unconditionally. Ensure that
all warnings are conditional on a tr
[flang] Ensure all warning/portability messages are guarded by Should… (#90518)
…Warn()
Many warning messages were being emitted unconditionally. Ensure that
all warnings are conditional on a true result from a call to
common::LanguageFeatureControl::ShouldWarn() so that it is easy for a
driver to disable them all, or, in the future, to provide per-warning
control over them.
show more ...
|
#
3e930864 |
| 30-Apr-2024 |
Valentin Clement <clementval@gmail.com> |
Reland [flang][cuda] Update attribute compatibily check for unified matching rule
|
#
306ae14f |
| 01-May-2024 |
Valentin Clement (バレンタイン クレメン) <clementval@gmail.com> |
Revert "[flang][cuda] Update attribute compatibily check for unified matching rule" (#90696)
Reverts llvm/llvm-project#90679
|
#
86e5d6f1 |
| 01-May-2024 |
Valentin Clement (バレンタイン クレメン) <clementval@gmail.com> |
[flang][cuda] Update attribute compatibily check for unified matching rule (#90679)
This patch updates the compatibility checks for CUDA attribute iin
preparation to implement the matching rules de
[flang][cuda] Update attribute compatibily check for unified matching rule (#90679)
This patch updates the compatibility checks for CUDA attribute iin
preparation to implement the matching rules described in section 3.2.3.
We this patch the compiler will still emit an error when there is
multiple specific procedures that matches since the matching distances
is not yet implemented. This will be done in a separate patch.
https://docs.nvidia.com/hpc-sdk/archive/24.3/compilers/cuda-fortran-prog-guide/index.html#cfref-var-attr-unified-data
gpu=unified and gpu=managed are not part of this patch since these
options are not recognized by flang yet.
show more ...
|
#
0e1bb1d8 |
| 24-Apr-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang] Don't convert actual arguments when interface is implicit (#89795)
When the interface of a procedure is implicit at the point of call,
don't perform actual argument type conversion to the t
[flang] Don't convert actual arguments when interface is implicit (#89795)
When the interface of a procedure is implicit at the point of call,
don't perform actual argument type conversion to the types of the dummy
arguments. This was inadvertently taking place in a case where the
procedure has an implicit interface but was also defined in the same
source file, so that its characteristics were known.
show more ...
|
#
cb263919 |
| 22-Apr-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang] Make proc characterization error conditional for generics (#89429)
When the characteristics of a procedure depend on a procedure that
hasn't yet been defined, the compiler currently emits a
[flang] Make proc characterization error conditional for generics (#89429)
When the characteristics of a procedure depend on a procedure that
hasn't yet been defined, the compiler currently emits an unconditional
error message. This includes the case of a procedure whose
characteristics depend, perhaps indirectly, on itself. However, in the
case where the characteristics of a procedure are needed to resolve a
generic, we should not emit an error for a hitherto undefined procedure
-- either the call will resolve to another specific procedure, in which
case the error is spurious, or it won't, and then an error will issue
anyway.
Fixes https://github.com/llvm/llvm-project/issues/88677.
show more ...
|
#
e8572d0f |
| 22-Apr-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang] Don't emit conversion error for max(a,b, optionalCharacter) (#88156)
A recent patch added an error message for whole optional dummy argument
usage as optional arguments (third or later) to
[flang] Don't emit conversion error for max(a,b, optionalCharacter) (#88156)
A recent patch added an error message for whole optional dummy argument
usage as optional arguments (third or later) to MAX and MIN when those
names required type conversion, since that conversion only works when
the optional arguments are present. This check shouldn't care about
character lengths. Make it so.
show more ...
|
#
97e3f605 |
| 08-Apr-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang] Don't allow non-standard data conversions of potentially abse… (#87391)
…nt arguments
Arguments to the intrinsic functions MAX and MIN after the first two are
optional. When these actual
[flang] Don't allow non-standard data conversions of potentially abse… (#87391)
…nt arguments
Arguments to the intrinsic functions MAX and MIN after the first two are
optional. When these actual arguments might not be present at run time,
emit a compilation time error if they require data conversion (a
non-standard but nearly universal language extension); such a conversion
would crash if the argument was absent.
Other compilers either disallow data conversions entirely on MAX/MIN or
crash at run time if a converted argument is absent.
Fixes https://github.com/llvm/llvm-project/issues/87046.
show more ...
|
#
3ada883f |
| 26-Mar-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang][runtime] Runtime support for REDUCE() (#86214)
Supports the REDUCE() transformational intrinsic function of Fortran
(see F'2023 16.9.173) in a manner similar to the existing support for
SU
[flang][runtime] Runtime support for REDUCE() (#86214)
Supports the REDUCE() transformational intrinsic function of Fortran
(see F'2023 16.9.173) in a manner similar to the existing support for
SUM(), PRODUCT(), &c. There are APIs for total reductions to scalar
results, and APIs for partial reductions that reduce the rank of the
argument by one.
This implementation requires more functions than other reductions
because the various possible types of the user-supplied OPERATION=
function need to be elaborated.
Once the basic API in reduce.h has been approved, later patches will
implement lowering.
REDUCE() is primarily for completeness, not portability; only one other
Fortran compiler implements this F'2018 feature today, and only some
types work correctly with it.
show more ...
|
#
03e50c45 |
| 13-Mar-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang] Emit warning when Hollerith actual passed to CLASS(*) (#84084)
When a Hollerith actual argument is associated with an unlimited
polymorphic dummy argument, it's treated as if it were CHARAC
[flang] Emit warning when Hollerith actual passed to CLASS(*) (#84084)
When a Hollerith actual argument is associated with an unlimited
polymorphic dummy argument, it's treated as if it were CHARACTER. Some
other compilers treat it as if it had been BOZ, so emit a portability
warning.
Resolves https://github.com/llvm/llvm-project/issues/83548.
show more ...
|
#
1c530b3d |
| 01-Mar-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang] Whether a procedure's interface is explicit or not is not a d… (#82796)
…istinguishing characteristic
We note whether a procedure's interface is explicit or implicit as an
attribute of i
[flang] Whether a procedure's interface is explicit or not is not a d… (#82796)
…istinguishing characteristic
We note whether a procedure's interface is explicit or implicit as an
attribute of its characteristics, so that other semantics can be checked
appropriately, but this internal attribute should not be used as a
distinguishing characteristic in itself.
Fixes https://github.com/llvm/llvm-project/issues/81876.
show more ...
|
#
f31ac3cb |
| 01-Mar-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang] Handle implied ASYNCHRONOUS attribute (#82638)
The standard states that data objects involved in an asynchronous data
transfer statement gain the ASYNCHRONOUS attribute implicitly in the
s
[flang] Handle implied ASYNCHRONOUS attribute (#82638)
The standard states that data objects involved in an asynchronous data
transfer statement gain the ASYNCHRONOUS attribute implicitly in the
surrounding subprogram or BLOCK scope. This attribute affects the checks
in call semantics, as an ASYNCHRONOUS actual object associated with an
ASYNCHRONOUS dummy argument must not require data copies in or out.
(Most compilers don't implement implied ASYNCHRONOUS attributes
correctly; XLF gets these right, and GNU is close.)
show more ...
|
#
8b389708 |
| 31-Jan-2024 |
Katherine Rasmussen <krasmussen@lbl.gov> |
[flang] Add image_index to list of intrinsics and add tests (#79519)
Add image_index to the list of intrinsic functions and add additional
check on its args in check-call.cpp. Add two semantics tes
[flang] Add image_index to list of intrinsics and add tests (#79519)
Add image_index to the list of intrinsic functions and add additional
check on its args in check-call.cpp. Add two semantics tests for
image_index.
show more ...
|
#
3bca8506 |
| 25-Jan-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang] Correct checking of PRESENT() (#78364)
The argument to the PRESENT() intrinsic function must be the name of a a
whole OPTIONAL dummy argument.
Fixes llvm-test-suite/Fortran/gfortran/regr
[flang] Correct checking of PRESENT() (#78364)
The argument to the PRESENT() intrinsic function must be the name of a a
whole OPTIONAL dummy argument.
Fixes llvm-test-suite/Fortran/gfortran/regression/present_1.f90.
show more ...
|
#
50e2581a |
| 22-Jan-2024 |
Tom Eccles <tom.eccles@arm.com> |
[flang] Allow assumed-shape element pass to dummy arg with ignore_tkr (#78196)
This is allowed by gfortran and ifort with `![GCC|DEC]$ ATTRIBUTES
NO_ARG_CHECK`
|
#
f9b089a7 |
| 15-Jan-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang] Fix semantic checks for MOVE_ALLOC (#77362)
The checking of calls to the intrinsic subroutine MOVE_ALLOC is not
insisting that its first two arguments be whole allocatable variables or
com
[flang] Fix semantic checks for MOVE_ALLOC (#77362)
The checking of calls to the intrinsic subroutine MOVE_ALLOC is not
insisting that its first two arguments be whole allocatable variables or
components. Fix, move the code into check-calls.cpp (a better home for
such things), and clean up the tests.
Fixes https://github.com/llvm/llvm-project/issues/77230.
show more ...
|
#
828bfbef |
| 30-Nov-2023 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang] Suppress error meant to prevent discontiguous association whe… (#73175)
…n actual argument is contiguous
When an element of a contiguous pointer array or assumed-shape array is
associate
[flang] Suppress error meant to prevent discontiguous association whe… (#73175)
…n actual argument is contiguous
When an element of a contiguous pointer array or assumed-shape array is
associated as an actual argument with an assumed-size dummy array, don't
flag the usage as an error.
show more ...
|
#
e86591b3 |
| 30-Nov-2023 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang] Improve procedure interface compatibility checking for dummy … (#72704)
…arrays
When comparing dummy array extents, cope with references to symbols
better (including references to other
[flang] Improve procedure interface compatibility checking for dummy … (#72704)
…arrays
When comparing dummy array extents, cope with references to symbols
better (including references to other dummy arguments), and emit
warnings in dubious cases that are not equivalent but not provably
incompatible.
show more ...
|
#
bf4a8763 |
| 30-Nov-2023 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang] Move and extend REDUCE() compile-time checking (#72570)
Move the code to check the arguments of references to the intrinsic
function REDUCE() into Semantics/check-calls.cpp, and add checks
[flang] Move and extend REDUCE() compile-time checking (#72570)
Move the code to check the arguments of references to the intrinsic
function REDUCE() into Semantics/check-calls.cpp, and add checks for
several requirements from the standard that weren't yet caught.
show more ...
|
#
89165e8b |
| 30-Nov-2023 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang][openacc] Disable CUDA argument checks in OpenACC regions (#72310)
Checks for CUDA Fortran data attribute compatibility don't need to be
applied in OpenACC regions.
|