Skip to content

Sync libasr from LFortran #2319

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

Merged
merged 2 commits into from
Sep 12, 2023
Merged

Conversation

czgdp1807
Copy link
Collaborator

@czgdp1807 czgdp1807 commented Sep 11, 2023

LFortran PR - lfortran/lfortran#2403

@czgdp1807 czgdp1807 force-pushed the libasr_sync_06 branch 2 times, most recently from 624e234 to c3ec9ab Compare September 11, 2023 07:19
@ansharlubis
Copy link
Collaborator

instantiate_template looks good to me!

@@ -723,7 +723,7 @@ RUN(NAME enum_06 LABELS cpython llvm c)
RUN(NAME enum_07 IMPORT_PATH ..
LABELS cpython llvm c)
RUN(NAME union_01 LABELS cpython llvm c)
RUN(NAME union_02 LABELS cpython llvm c)
RUN(NAME union_02 LABELS cpython llvm c NOFAST)
Copy link
Collaborator Author

@czgdp1807 czgdp1807 Sep 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fast mode, this test silently works incorrectly on main branch as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How so? How can it silently work? Is our cmake flaky? If so, that's an urgent bug to fix.

Copy link
Collaborator Author

@czgdp1807 czgdp1807 Sep 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With main branch,

(lp) 14:17:37:~/lpython_project/lpython % lpython integration_tests/union_02.py --fast
0 1.00000000000000000e+00
2 7.00000000000000000e+00
5 1.30000000000000000e+01 3.04899892523928701e-314
(lp) 14:17:55:~/lpython_project/lpython % lpython integration_tests/union_02.py       
0 1.00000000000000000e+00
2 7.00000000000000000e+00
5 1.30000000000000000e+01 8.00000000000000000e+00

You can clearly see the difference in the last value of third line. --fast should have given assertion error in main branch but it didn't. So, clearly its passing silently in main branch as well. In my libasr_sync_06 this failure just shows up as an assertion error, something which should have happened in main branch only. I will fix it later, after getting this PR merged. The problem AFAIK is with LLVM generated code. --fast with LLVM removes assert statements (they were present in the ASR after applying all the passes).

Is our cmake flaky? If so, that's an urgent bug to fix.

I don't think that's the problem.

@ubaidsk
Copy link
Collaborator

ubaidsk commented Sep 12, 2023

I think all the changes related to https://github.com/lcompilers/lpython/pull/2260/files (there are several in this PR currently) are to be reverted.

@ubaidsk
Copy link
Collaborator

ubaidsk commented Sep 12, 2023

I think all the changes related to https://github.com/lcompilers/lpython/pull/2260/files (there are several in this PR currently) are to be reverted.

They might need to be updated to LFortran PR as well.

Copy link
Collaborator

@Thirumalai-Shaktivel Thirumalai-Shaktivel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you very much!

@czgdp1807 czgdp1807 merged commit a6c965e into lcompilers:main Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants