You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered this bug while working out the fix for #2613 . This bug caused me to wander A LOT trying to find the actual cause of the issue. It was only after executing std::cout << LCompilers::pickle(asr, true, false, false) << std::endl; in asr_to_llvm.cpp that I could see the actual ASR which was being constructed, matching the output I was receiving.
Minimum Reproducible Example
Note: The following example will not work after #2620 is merged.
Thanks for looking into this. I think this is not a bug, but a feature. When you do --show-asr you can see the original ASR that was constructed. This ASR is then passed through several ASR->ASR passes. The backends then receive this transformed ASR.
Therefore the ASR that you see from the output of --show-asr and the ASR that the backends see are different.
To check the ASR that the backends see, you can do --dump-all-passes and you will get some files generated that contain the ASR output after each pass. You can simply check the ASR output after the last pass as that is the ASR that will be seen by the backends.
PS: You can also combine --visualize with --dump-all-passes (or --show-asr) if you want to see ASR visualization.
The ASR being constructed after the passes in the example shared here #2621 (comment) is definitely incorrect. I think we have an issue noted for it here #2613.
I encountered this bug while working out the fix for #2613 . This bug caused me to wander A LOT trying to find the actual cause of the issue. It was only after executing
std::cout << LCompilers::pickle(asr, true, false, false) << std::endl;
inasr_to_llvm.cpp
that I could see the actual ASR which was being constructed, matching the output I was receiving.Minimum Reproducible Example
Note: The following example will not work after #2620 is merged.
ASR output for
--show-asr
Actual ASR after transformation
The text was updated successfully, but these errors were encountered: