My full rebuild log using MSYS2 MINGW64 environment.
I had to edit toolchain to use the correct FORTRAN exe of "x86_64-w64-mingw32-gfortran.exe" from default of "mingw32-gfortran.exe".
This is because my GCC FORTRAN installation does not have the normal "mingw32-gfortran.exe"; but, the error did not match your error.
I am using Code::Blocks svn-r13215 that might be why the error was different or your error is not because the exe was missing.
Tim S.
-------------- Clean: Debug in testfortran (compiler: GNU Fortran Compiler)---------------
Cleaned "testfortran - Debug"
-------------- Build: Debug in testfortran (compiler: GNU Fortran Compiler)---------------
x86_64-w64-mingw32-gfortran.exe -Jobj\Debug\ -Wall -g -c H:\devel\cb_projects\test\testfortran\main.f90 -o obj\Debug\main.o
f951.exe: Warning: Nonexistent include directory 'obj\Debug\' [-Wmissing-include-dirs]
x86_64-w64-mingw32-gfortran.exe -o bin\Debug\testfortran.exe obj\Debug\main.o
Output file is bin\Debug\testfortran.exe with size 119.62 KB
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 1 warning(s) (0 minute(s), 0 second(s))