Mentions légales du service

Skip to content

Fix issue 268

Created by: vaussard

In an assignment, if a lhs also appears as a rhs, no intermediate variable is used when accessing a memory. This can lead to unexpected results, if the rhs references an index already written into the lhs.

To address this issue, we need to use a temporary variable. We hook this into expandVectorialNodes(), as adding a new pass seems unnecessary for now. We detect if the lhs is also part of the rhs (basic check), then create a temporary variable, create a new subtree, then continue the expansion as usual.

Pull request based on the branch release-1.3.x. This can also be merged into master, but a conflict inside tests/CMakeLists.txt will need to be addressed.

Merge request reports