The following code is compiled with debug (no optimisation), irk is a integer parameter equal to 8 in this case:
function dca_axis_ang(theta,x) result(dca) implicit none real(irk) :: dca(3,3) real(irk),intent(in) :: theta,x(3) real(irk) :: t,c,s c = cos(theta); s = sin(theta); t = 1.0_irk - c dca(:,1) = [ t*x(1)*x(1) + c, t*x(1)*x(2) + s*x(3), t*x(1)*x(3) - s*x(2) ] ! do col 1 dca(:,2) = [ t*x(1)*x(2) - s*x(3), t*x(2)*x(2) + c, t*x(2)*x(3) + s*x(1) ] ! do col 2 dca(:,3) = [ t*x(1)*x(3) + s*x(2), t*x(2)*x(3) - s*x(1), t*x(3)*x(3) + c ] ! do col 3 end function dca_axis_ang
In VS2010 shell with that latest (IA32) compiler when stepping into that in debug the array dca is shown in the watch window with dca{...}, after each assignment this becomes [+]dca{...} but if you click the + rather than expanding the array the plus just goes. It is not possible to see any values.
On exit from the function the result is copied into an external array OK it would seem. This seems strange behaviour, is there some known problem here?