I was trying to run a basic piece of test code (named test.f90) through fortran on macOS Monterey (M1) version 12.3. The code is:
program test
integer, dimension(2,2) :: f,g
integer :: i,j
do i=1,2
do j=1,2
f(i,j)=2*i+j
g(i,j)=i+3*j
enddo
enddo
!print*,f ! gives f(x1,y1,z1),f(x2,y1,z1),...,f(x1,y2,z1),f(x2,y2,z1),...
print*,f
print*,g
print*,f*g
print*,f(:,:)*g(:,:)
f = reshape( (/1,2,3,4/), (/2,2/) )
print*,sum(f)
end program
The gfortran version is: GNU Fortran (Homebrew GCC 11.2.0_3) 11.2.0. When I did gfortran test.f90, the following error popped up:
ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libm.tbd' for architecture arm64