<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/flang/lib/Semantics/assignment.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[flang][NFC] Use parser::Unwrap(Ref) more (#162918)</title>
<updated>2025-10-16T19:20:27+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-10-16T19:20:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e0bffe1ff9082c7775063ccd52ec7213ee24f453'/>
<id>e0bffe1ff9082c7775063ccd52ec7213ee24f453</id>
<content type='text'>
Replace more parse tree references to "thing" and "value()" with usage
of the parser::Unwrap&lt;&gt; template function.
Add parser::UnwrapRef&lt;&gt; as an alias for DEREF(Unwrap&lt;&gt;()).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace more parse tree references to "thing" and "value()" with usage
of the parser::Unwrap&lt;&gt; template function.
Add parser::UnwrapRef&lt;&gt; as an alias for DEREF(Unwrap&lt;&gt;()).</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Emit error on impossible-to-implement construct (#160384)</title>
<updated>2025-09-30T17:34:41+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-09-30T17:34:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2780c209e1e242fd9e7d71045f88fe4e824cee20'/>
<id>2780c209e1e242fd9e7d71045f88fe4e824cee20</id>
<content type='text'>
An assignment to a whole polymorphic allocatable changes its dynamic
type to the type of the right-hand side expression. But when the
assignment is under control of a WHERE statement, or a FORALL / DO
CONCURRENT with a mask expression, there is no interpretation of the
assignment, as the type of a variable must be the same for all of its
elements.

There is no restriction in the standard against this usage, and no other
Fortran compiler complains about it. But it is not possible to implement
it in general, and the behavior produced by other compilers is not
reasonable, much less worthy of emulating. It's best to simply disallow
it with an error message.

Fixes https://github.com/llvm/llvm-project/issues/133669, or more
accurately, resolves it.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An assignment to a whole polymorphic allocatable changes its dynamic
type to the type of the right-hand side expression. But when the
assignment is under control of a WHERE statement, or a FORALL / DO
CONCURRENT with a mask expression, there is no interpretation of the
assignment, as the type of a variable must be the same for all of its
elements.

There is no restriction in the standard against this usage, and no other
Fortran compiler complains about it. But it is not possible to implement
it in general, and the behavior produced by other compilers is not
reasonable, much less worthy of emulating. It's best to simply disallow
it with an error message.

Fixes https://github.com/llvm/llvm-project/issues/133669, or more
accurately, resolves it.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][cuda] Do not produce data transfer in offloaded do concurrent (#147435)</title>
<updated>2025-07-08T17:52:15+00:00</updated>
<author>
<name>Valentin Clement (バレンタイン クレメン)</name>
<email>clementval@gmail.com</email>
</author>
<published>2025-07-08T17:52:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=46caad52ac14cefd6f9cf3188863818e330f3844'/>
<id>46caad52ac14cefd6f9cf3188863818e330f3844</id>
<content type='text'>
If a `do concurrent` loop is offloaded then there should be no CUDA data
transfer in it. Update the semantic and lowering to take that into
account.

`AssignmentChecker` has to be put into a separate pass because the
checkers in `SemanticsVisitor` cannot have the same `Enter/Leave`
functions. The `DoForallChecker` already has `Eneter/Leave` functions
for the `DoConstruct`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a `do concurrent` loop is offloaded then there should be no CUDA data
transfer in it. Update the semantic and lowering to take that into
account.

`AssignmentChecker` has to be put into a separate pass because the
checkers in `SemanticsVisitor` cannot have the same `Enter/Leave`
functions. The `DoForallChecker` already has `Eneter/Leave` functions
for the `DoConstruct`.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][openmp]Add UserReductionDetails and use in DECLARE REDUCTION (#140066)</title>
<updated>2025-06-09T10:17:03+00:00</updated>
<author>
<name>Tom Eccles</name>
<email>tom.eccles@arm.com</email>
</author>
<published>2025-06-09T10:17:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ce603a0f16209bd7eb2bd378d6a3f13fe52a1063'/>
<id>ce603a0f16209bd7eb2bd378d6a3f13fe52a1063</id>
<content type='text'>
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 &lt;mats.petersson@arm.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;mats.petersson@arm.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Fix spurious error on defined assignment in PURE (#139186)</title>
<updated>2025-05-13T14:48:54+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-05-13T14:48:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=53f0367ab0fa7e958f42fc07ceb9c38b9b9c74f2'/>
<id>53f0367ab0fa7e958f42fc07ceb9c38b9b9c74f2</id>
<content type='text'>
An assignment to a whole polymorphic object in a PURE subprogram that is
implemented by means of a defined assignment procedure shouldn't be
subjected to the same definability checks as it would be for an
intrinsic assignment (which would also require it to be allocatable).

Fixes https://github.com/llvm/llvm-project/issues/139129.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An assignment to a whole polymorphic object in a PURE subprogram that is
implemented by means of a defined assignment procedure shouldn't be
subjected to the same definability checks as it would be for an
intrinsic assignment (which would also require it to be allocatable).

Fixes https://github.com/llvm/llvm-project/issues/139129.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Enforce C15104(5) for coindexed values (#130203)</title>
<updated>2025-03-10T20:20:35+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-03-10T20:20:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=40d9096fda65dc94fc1b10c091802dcb8f3ab3a5'/>
<id>40d9096fda65dc94fc1b10c091802dcb8f3ab3a5</id>
<content type='text'>
A object's value can't be copied from another image by means of an
intrinsic assignment statement if it has a derived type that contains a
pointer subobject ultimate component.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A object's value can't be copied from another image by means of an
intrinsic assignment statement if it has a derived type that contains a
pointer subobject ultimate component.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][cuda] Allow unsupported data transfer to be done on the host (#129160)</title>
<updated>2025-03-03T00:12:01+00:00</updated>
<author>
<name>Valentin Clement (バレンタイン クレメン)</name>
<email>clementval@gmail.com</email>
</author>
<published>2025-03-03T00:12:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d1fd3698a9b755250f622fd1b14c57a27e2a9d77'/>
<id>d1fd3698a9b755250f622fd1b14c57a27e2a9d77</id>
<content type='text'>
Some data transfer marked as unsupported can actually be deferred to an
assignment on the host when the variables involved are unified or
managed.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some data transfer marked as unsupported can actually be deferred to an
assignment on the host when the variables involved are unified or
managed.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][cuda] Relax semanctic check in cuf kernel and openacc compute constructs (#125750)</title>
<updated>2025-02-04T21:10:47+00:00</updated>
<author>
<name>Valentin Clement (バレンタイン クレメン)</name>
<email>clementval@gmail.com</email>
</author>
<published>2025-02-04T21:10:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bbc90f899a464048eb6fef2626fcaae66eecee06'/>
<id>bbc90f899a464048eb6fef2626fcaae66eecee06</id>
<content type='text'>
Previous patch was too restrictive and didn't take into account cuf
kernels and openacc compute constructs as being device context.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previous patch was too restrictive and didn't take into account cuf
kernels and openacc compute constructs as being device context.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][cuda] Detect illegal data transfer in semantic (#125591)</title>
<updated>2025-02-03T23:00:43+00:00</updated>
<author>
<name>Valentin Clement (バレンタイン クレメン)</name>
<email>clementval@gmail.com</email>
</author>
<published>2025-02-03T23:00:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7e1437ba4abd40a0d1955f59d09719537a05f9e0'/>
<id>7e1437ba4abd40a0d1955f59d09719537a05f9e0</id>
<content type='text'>
When the LHS is a device variable and the RHS has implicit transfer,
this is considered as an illegal transfer according to
https://docs.nvidia.com/hpc-sdk/compilers/cuda-fortran-prog-guide/index.html#implicit-data-transfer-in-expressions.

Detect this is semantic .</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the LHS is a device variable and the RHS has implicit transfer,
this is considered as an illegal transfer according to
https://docs.nvidia.com/hpc-sdk/compilers/cuda-fortran-prog-guide/index.html#implicit-data-transfer-in-expressions.

Detect this is semantic .</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Allow LOCK_TYPE &amp; al. to associate with INTENT(IN OUT) (#121413)</title>
<updated>2025-01-08T21:14:02+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-01-08T21:14:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=07b3bba901e7d51b3173631d6af811eae9d84cda'/>
<id>07b3bba901e7d51b3173631d6af811eae9d84cda</id>
<content type='text'>
We're emitting a bogus semantic error message about an actual argument
being undefinable when associating LOCK_TYPE, EVENT_TYPE, and someday
NOTIFY_TYPE with an INTENT(IN OUT) dummy argument. These types indeed
make many definition contexts invalid, and the actual argument
associated with an INTENT(IN OUT) dummy argument must indeed be
definable, but the argument association itself is not a problem.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We're emitting a bogus semantic error message about an actual argument
being undefinable when associating LOCK_TYPE, EVENT_TYPE, and someday
NOTIFY_TYPE with an INTENT(IN OUT) dummy argument. These types indeed
make many definition contexts invalid, and the actual argument
associated with an INTENT(IN OUT) dummy argument must indeed be
definable, but the argument association itself is not a problem.</pre>
</div>
</content>
</entry>
</feed>
