test: Port integration_tests/arrays_31.f90, arrays_34.f90 and arrays_35.f90 from LFortran and improve LC to compile it#112
Open
Pranavchiku wants to merge 4 commits intolcompilers:mainfrom
Open
Conversation
Author
|
Aah I forgot to update references, will do it. |
czgdp1807
requested changes
Mar 18, 2024
Comment on lines
+36
to
+39
|
|
||
| [[test]] | ||
| filename = "../integration_tests/array_28.cpp" | ||
| asr = true |
Collaborator
There was a problem hiding this comment.
Suggested change
| [[test]] | |
| filename = "../integration_tests/array_28.cpp" | |
| asr = true | |
| # TODO: Remove after integration_tests/array_28.cpp compiles with LC | |
| [[test]] | |
| filename = "../integration_tests/array_28.cpp" | |
| asr = true |
Collaborator
There was a problem hiding this comment.
Reference testing should be as limited as possible.
ubaidsk
reviewed
Mar 18, 2024
| } else { | ||
| dest = ASRUtils::extract_type(dest); | ||
| } | ||
| if (ASR::is_a<ASR::ArrayConstant_t>(*expr)) { |
Collaborator
There was a problem hiding this comment.
I think casting should be done only on the basis of type. Using expression to decide casting operation seems more like a hard-coded approach.
ubaidsk
reviewed
Mar 18, 2024
Comment on lines
+152
to
+153
| arr->m_args[i] = ASRUtils::expr_value(ASRUtils::EXPR(ASRUtils::make_Cast_t_value(al, loc, arr->m_args[i], | ||
| cast_kind, ASRUtils::expr_type(arr->m_args[i])))); |
Collaborator
There was a problem hiding this comment.
It seems we are casting each array element to the type of that same array element. So, why is a casting being needed?
Collaborator
|
Thanks for the reviews @Shaikh-Ubaid. I had similar questions but these changes felt harmless to me for now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.