fparser icon indicating copy to clipboard operation
fparser copied to clipboard

Inconsistent parse tree for allocate statements

Open arporter opened this issue 3 years ago • 1 comments

allocate(grid%data(ndof))

gives:

Allocation(Data_Ref('%', (Name('grid'), Name('data'))), Allocate_Shape_Spec_List(',', (Allocate_Shape_Spec(None, Name('ndof')),)))

while

allocate(grid%coords, mold=grid%data)

gives:

Data_Ref('%', (Name('grid'), Name('coords')))

My reading of the standard is that both of these cases should give an Allocation object whereas the second one gives a bare Data_Ref. I suspect the parse tree should be:

Allocation(Data_Ref('%', (Name('grid'), Name('data'))), )

arporter avatar Nov 17 '22 09:11 arporter

image

arporter avatar Nov 17 '22 09:11 arporter