The expression “a.eq.b” is valid. However, the expression returns an array of logicals which can’t be used in an if statement. Adding the ‘all’ intrinsic to perform a reduction should get the desired behavior:

% cat tmp.f90
program array
real :: a(4),b(4)
a=(/0.,3.,3.,1./)
b=(/0.,3.,3.,1./)
if (all(a.eq.b)) write (6,*) "a and b are the same"
stop
end
% pgf90 tmp.f90
% a.out
a and b are the same
FORTRAN STOP