-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect semantics of WHERE in some cases #2722
Comments
Also psyclone is happy to take non array expression like:
and cannonicalise them to some valid code with different meaning. While gfortran says:
I know that we assume we get valid Fortran, but since we now require to know the type of the symbols. Maybe we should check it has the valid type-rank and fail otherwise. |
We do not need multiple statements to get it wrong, see below:
|
We are also currently not testing the conditional expression for UnresolvedInterfaces and Elemental Calls as we do inside the where body, e.g. for |
For this program (with #2687 merged to support non-elementals and array notation):
compiled with gfortran prints:
if I do psyclone->gfortran it prints:
The reason I believe is that we always create the fused version of the where bodies, but the semantics imply that each array statement is evaluated one by one for each index before moving to the next, and the fusing is just an optimisation that most of the times can be done but not always.
The text was updated successfully, but these errors were encountered: