-
Notifications
You must be signed in to change notification settings - Fork 134
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
Fix implied do and array constructor (fixes #1200) #1212
Conversation
The CI is fixed. Please rebase to run CI. |
@zhaochuanfeng I already rebased the branch on master a couple of days ago. Can you rebase again and remove the merge commit? |
…ray constructor Fix errors when function statment appears in loop body or loop control of implied-do loop and the actual parameter is an array construction that depends on the loop variable, the assignment of the temporary array generated for the array construction is generated outside the loop, resulting in the use of uninitialized loop variable. Now support the following cases: 1. Multiple layers of implied-do loop nesting. 2. The loop body in a single array construction or the loop body in an implied-do loop contains multiple implied-do loops. 3. The implied-do loop is converted from "<expression> : <expression> <opt stride>".
Sure, alreay done. |
Thanks. I have confirmed that the branch is rebased on the latest master, and is not changed otherwise. |
I find another issue concerning array constructors: #1227 Do you think it is related to the bug fixed here? Thank you! |
Hello,
This causes failure in our CI where memory restrictions do apply. |
@zhaochuanfeng As it turned out, the problem with the code added by upstream PR#1212 is with the call to the The Apparently, the way it is used in the code added by PR#1212 is not entirely legal. Moving some of the AST nodes ahead in the STD list without checking for possible dependencies turned out to be problematic. In the As this is issue is potentially harmful in some very non-obvious ways, this needs to be addressed. I have worked out a temporary hack (which is not a final solution). After the move is done, the affected nodes are copied back to their original place, but only in the case when there is anything to copy (begin != end, note that in opposite case the
|
Fix errors when function statement appears in loop body or loop control of
implied-do loop and the actual parameter is an array construction that
depends on the loop variable, the assignment of the temporary array
generated for the array construction is generated outside the loop,
resulting in the use of an uninitialized loop variable.
Now support the following cases:
the loop body in an implied-do loop contains multiple implied-do loops.