Hi,
I'm using intel fortran on a mac (ifort version 16.0.3) and I think that there is a possible bug with the MAXLOC function.
When I run the testing.f90 program I get:
1
1
2
3
1
using gfortran I get, which in my opinion is the right answer,
0
1
2
3
0
Am I right?
Best,
Rodolfo