I’ve decided to test compilation of some of my new projects with LFortran alongside gfortran, because I think it would be great to eventually use the modules in jupyter notebooks (esp. the plotting library) and want to help improve it by identifying issues along the way. I didn’t see a similar topic/issue posted anywhere else for LFortran.
I ran into issues (syntax error: Token ',' is unexpected here, pointing at the first comma after the first 0 here) with a data statement if I use derived types. See MRE below:
program data_test
integer :: i
type(col) :: colours
data (colours%rgb(i), i=1,3) /0, 0, 0/
type :: col
integer :: rgb(3)
end type col
end program
In contrast, the following compiles fine with LFortran:
program data_test
integer :: i, rgb(3)
data (rgb(i), i=1,3) /0, 0, 0/
end program
Hi. Thanks for the suggestion. However, it does not change anything if I do this here. (In the actual library, I define types in a separate module first and use it here, btw).