Skip to content
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

bug : struct array member in arrayconstructor #5840

Closed
assem2002 opened this issue Dec 27, 2024 · 5 comments · Fixed by #5883
Closed

bug : struct array member in arrayconstructor #5840

assem2002 opened this issue Dec 27, 2024 · 5 comments · Fixed by #5883
Labels
AoC-2023 Tracing issue and PRs related to Aoc-2023 fortran solutions

Comments

@assem2002
Copy link
Contributor

This issue works fine with --experimental-simplifier
MRE

program test
    type :: m
    integer :: aa(1)
    end type m
    integer :: j(3)
    type(m) :: tt
    j = [ 1,2, tt%aa]
end program test
code generation error: asr_to_llvm: module failed verification. Error:
Stored value type does not match pointer operand type!
  store [1 x i32] %24, i32* %22, align 4
 i32

found in problem_05.f90

@assem2002 assem2002 added the AoC-2023 Tracing issue and PRs related to Aoc-2023 fortran solutions label Dec 27, 2024
@assem2002 assem2002 changed the title bug : array-struct member in arrayconstructor. bug : array-struct member in arrayconstructor Dec 27, 2024
@assem2002 assem2002 changed the title bug : array-struct member in arrayconstructor bug : struct array member in arrayconstructor Dec 28, 2024
@assem2002
Copy link
Contributor Author

as the experimental simplifier is now set as default, this MRE works in fortran by default. so I'll close it.

@certik
Copy link
Contributor

certik commented Dec 29, 2024

Should we add a test for it?

@assem2002
Copy link
Contributor Author

assem2002 commented Dec 29, 2024

I think it's a good test for showing the power of simplifier pass. It would have an ONLY_EXPERIMENTAL_SIMPLIFIER label on it, Is it okay or we should fix it to run without that label?
@certik @czgdp1807

@czgdp1807
Copy link
Member

IMO, no need to fix it. Simplifier is the default, so we are fine.

@certik
Copy link
Contributor

certik commented Dec 31, 2024

Yes, add a test and ONLY_EXPERIMENTAL_SIMPLIFIER on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AoC-2023 Tracing issue and PRs related to Aoc-2023 fortran solutions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants