PSyclone
PSyclone copied to clipboard
psyad error when there is a unary minus
If there is a unary minus on the rhs of an active assignment then PSyclone does not find the active variables on the RHS. For example:
> cat tmp.f90
program tmp
real :: x, active, active2
active = -x * active2
end program tmp
> psyad tmp.f90 -a active active2
TangentLinearError: Each term on the RHS of the assignment 'active = -x * active2
' must be linear with respect to the active variable, but found '-x * active2'.
If the unary minus is removed then psyad works OK.
Created branch 1583_psyad_unary_minus
The error is raised in the validation, but the actual transformation seems to work. I therefore need to update the validation check.