History log of /llvm-project/flang/lib/Evaluate/tools.cpp (Results 1 – 25 of 128)
Revision Date Author Comments
# 08c36428 27-Jan-2025 Peter Klausler <pklausler@nvidia.com>

[flang] Improve error message on bad complex literal. (#124331)

A complex literal constant can have one BOZ component, since the type
and value of the literal can be determined by converting the BO

[flang] Improve error message on bad complex literal. (#124331)

A complex literal constant can have one BOZ component, since the type
and value of the literal can be determined by converting the BOZ value
to the type of the other component. But a complex literal constant with
two BOZ components doesn't have a well-defined type. The error message
was confusing in the case; emit a better one.

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

show more ...


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

[flang] Fix crash in fuzzing test (#122189)

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


# 3a8a52f4 08-Jan-2025 Peter Klausler <pklausler@nvidia.com>

[flang] Make IsCoarray() more accurate (#121415)

A designator without cosubscripts can have subscripts, component
references, substrings, &c. and still have corank. The current
IsCoarray() predica

[flang] Make IsCoarray() more accurate (#121415)

A designator without cosubscripts can have subscripts, component
references, substrings, &c. and still have corank. The current
IsCoarray() predicate only seems to work for whole variable/component
references. This was breaking some cases of THIS_IMAGE().

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 ...


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

[flang][cuda] Do not lower device target in porgram as global (#120126)

As it was done in #102512, do not create global for arrays declared in
program unit with cuda data attribute.


# 3433e414 27-Nov-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Detect constant on the rhs of data transfer (#117806)

When the rhs expression has some constants and a device symbol, an
implicit data transfer needs to be generated for the device sy

[flang][cuda] Detect constant on the rhs of data transfer (#117806)

When the rhs expression has some constants and a device symbol, an
implicit data transfer needs to be generated for the device symbol and
the computation with the constant is done on the host.

show more ...


# a54e8b2c 20-Nov-2024 Peter Klausler <pklausler@nvidia.com>

[flang] Silence bogus error about insufficiently defined interfaces (#116694)

The interfaces of separate module procedures are sufficiently well
defined in a submodule to be used in a local generic

[flang] Silence bogus error about insufficiently defined interfaces (#116694)

The interfaces of separate module procedures are sufficiently well
defined in a submodule to be used in a local generic interface; the
compiler just needed to work a little harder to find them.

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

show more ...


# 35e86245 15-Oct-2024 Peter Klausler <pklausler@nvidia.com>

[flang] Silence impossible error about SMP interface incompatibility (#112054)

It is possible for the compiler to emit an impossible error message
about dummy argument character length incompatibil

[flang] Silence impossible error about SMP interface incompatibility (#112054)

It is possible for the compiler to emit an impossible error message
about dummy argument character length incompatibility in the case of a
MODULE SUBROUTINE or FUNCTION defined later in a submodule with MODULE
PROCEDURE, when the character length is defined by USE association in
its interface. The checking for separate module procedure interface
compatibility needs to use a more flexible check than just operator== on
a semantics::ParamValue.

show more ...


# 4194e8de 19-Sep-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda][NFC] Fix grammar in CanCUDASymbolHasSave function name (#109234)


# b5ce7a9f 10-Sep-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Avoid generating data transfer when calling size intrinsic (#108081)

cuf.data_transfer was wrongly generated when calling the `size`
intrinsic on a device allocatable variable. Since

[flang][cuda] Avoid generating data transfer when calling size intrinsic (#108081)

cuf.data_transfer was wrongly generated when calling the `size`
intrinsic on a device allocatable variable. Since the descriptor is
available on the host, there is no transfer needed.

Add `DescriptorInquiry` in the `CollectCudaSymbolsHelper` to filter out
symbols that are not needed for the transfer decision to be made.

show more ...


# b21b907a 17-Aug-2024 Kelvin Li <kkwli@users.noreply.github.com>

[flang] Handle Hollerith in data statement initialization in big endian (#103451)

Update to read the Hollerith literal in reverse order for big endian
environment.


# 8c3b6bd0 08-Aug-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Do not lower device variables in main program as globals (#102512)

Flang considers arrays in main program larger than 32 bytes having the
SAVE attribute and lowers them as globals. In

[flang][cuda] Do not lower device variables in main program as globals (#102512)

Flang considers arrays in main program larger than 32 bytes having the
SAVE attribute and lowers them as globals. In CUDA Fortran, device
variables are not allowed to have the SAVE attribute and should be
allocated dynamically in the main program scope.
This patch updates lowering so CUDA Fortran device variables are not
considered with the SAVE attribute.

show more ...


# e66ea43a 11-Jul-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Improve data transfer detection by filtering symbols (#98378)

The current data transfer detection was collecting too many symbol and
made wrong decision. This patch introduces a new f

[flang][cuda] Improve data transfer detection by filtering symbols (#98378)

The current data transfer detection was collecting too many symbol and
made wrong decision. This patch introduces a new function
`CollectCudaSymbols` that is different than `CollectSymbols` and collect
only symbol of interest for cuda data transfer in an expression.

Currently two cases where symbols are filtered out are:
- array subscripts: only the array symbol is on interest, the indexing
can be filtered out
- function arguments: symbols of the function arguments are filtered
out.

This fix some false positive data transfer and implicit data transfer.

More filtering might be needed and will be added as follow up patches.

show more ...


# 3602efa7 24-Jun-2024 Peter Klausler <35819229+klausler@users.noreply.github.com>

[flang] Silence errors on C_LOC/C_FUNLOC in specification expressions (#96108)

Transformational functions from the intrinsic module ISO_C_BINDING are
allowed in specification expressions, so tweak

[flang] Silence errors on C_LOC/C_FUNLOC in specification expressions (#96108)

Transformational functions from the intrinsic module ISO_C_BINDING are
allowed in specification expressions, so tweak some general checks that
would otherwise trigger error messages about inadmissible targets, dummy
procedures in specification expressions, and pure procedures with impure
dummy procedures.

show more ...


# 4b57fe65 18-Jun-2024 Peter Klausler <35819229+klausler@users.noreply.github.com>

[flang] Fold IEEE_SUPPORT_xxx() intrinsic functions (#95866)

All of the IEEE_SUPPORT_xxx() intrinsic functions must fold to constant
logical values when they have constant arguments; and since they

[flang] Fold IEEE_SUPPORT_xxx() intrinsic functions (#95866)

All of the IEEE_SUPPORT_xxx() intrinsic functions must fold to constant
logical values when they have constant arguments; and since they fold to
.TRUE. for currently support architectures, always fold them. But also
put in the infrastructure whereby a driver can initialize Evaluate's
target information to set some of them to .FALSE. if that becomes
necessary.

show more ...


# c7593344 03-Jun-2024 Peter Klausler <35819229+klausler@users.noreply.github.com>

[flang] Better error message for RANK(NULL()) (#93577)

We currently complain that the argument may not be a procedure, which is
confusing. Distinguish the NULL() case from other error cases (which

[flang] Better error message for RANK(NULL()) (#93577)

We currently complain that the argument may not be a procedure, which is
confusing. Distinguish the NULL() case from other error cases (which are
indeed procedures). And clean up the utility predicates used for these
tests -- the current IsProcedure() is really just a test for a procedure
designator.

show more ...


# 28c427e5 09-May-2024 Peter Klausler <35819229+klausler@users.noreply.github.com>

[flang] Ensure that DATA converter can cope with proc ptr error (#90973)

Multiple definitions of a procedure pointer with DATA statements should
elicit an error message, not a compiler crash.

Fi

[flang] Ensure that DATA converter can cope with proc ptr error (#90973)

Multiple definitions of a procedure pointer with DATA statements should
elicit an error message, not a compiler crash.

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

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 ...


# 38763be6 06-Mar-2024 jeanPerier <jperier@nvidia.com>

[flang] Do not traverse selectors in FindImpureCall and HasVectorSubscript (#84041)

In presence of symbols with AssocEntityDetails in an expression,
`Traverse`, `AnyTraverse`, `AllTraverse`, and `S

[flang] Do not traverse selectors in FindImpureCall and HasVectorSubscript (#84041)

In presence of symbols with AssocEntityDetails in an expression,
`Traverse`, `AnyTraverse`, `AllTraverse`, and `SetTraverse`
automatically visit the selector expression or variable.

This is most often the desired behavior but can be surprising, and was
not correct for FindImpureCall and HasVectorSubscript.

Add a default template option to flag the behavior to someone willing to
use the Traverse helper for a new utility, and set this template to
false for FindImpureCall and HasVectorSubscript.

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 ...


# 7b801233 15-Jan-2024 Peter Klausler <35819229+klausler@users.noreply.github.com>

[flang] More support for assumed-size Cray pointees (#77381)

Recognize Cray pointees as such when they are declared as assumed size
arrays, and don't emit a bogus error message about implied shape

[flang] More support for assumed-size Cray pointees (#77381)

Recognize Cray pointees as such when they are declared as assumed size
arrays, and don't emit a bogus error message about implied shape arrays.

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

show more ...


# 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 ...


# a2d7af75 02-Jan-2024 Katherine Rasmussen <krasmussen@lbl.gov>

[flang] Add notify-type and notify-wait-stmt (#76594)

Add `notify-type` to `iso_fortran_env` module. Add `notify-wait-stmt` to
the parser and add checks for constraints on the statement, `C1177` an

[flang] Add notify-type and notify-wait-stmt (#76594)

Add `notify-type` to `iso_fortran_env` module. Add `notify-wait-stmt` to
the parser and add checks for constraints on the statement, `C1177` and
`C1178`, from the Fortran 2023 standard. Add three semantics tests for
`notify-wait-stmt`.

show more ...


# b29d632e 02-Jan-2024 Peter Klausler <35819229+klausler@users.noreply.github.com>

[flang] Accept BIND(C) derived type for Cray pointees (#76538)

The compiler requires that a Cray pointee have a SEQUENCE type, but a
recent bug report points out that a BIND(C) type should also be

[flang] Accept BIND(C) derived type for Cray pointees (#76538)

The compiler requires that a Cray pointee have a SEQUENCE type, but a
recent bug report points out that a BIND(C) type should also be
accepted.

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

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 ...


123456