Menu

#50 ROSE: unparses structure component incorrectly

incorrect
open
ROSE (12)
5
2011-01-07
2011-01-07
No

The following code unparses incorrectly:

------------------
module test_struct

type var_wrap
real, dimension(:,:), pointer :: ptr2d
integer :: sizes(3)
end type

contains

subroutine foo()
type(var_wrap) :: vw

vw%ptr2d(1,vw%sizes(2)) = 1

end subroutine

end module
----------------------

Error message:

pn1169315:rose apittman$ testTranslator -c struct_ref.f90
rose_struct_ref.f90:9.3:

vw%(ptr2d(1,vw%sizes(2))) = 1
1
Error: Expected structure component name at (1)
---------------

This appears to be a weird problem triggered by vw%sizes(2).

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.