Oh, weird. MSYS2-specific certainly sounds odd. There were some Fortran parser changes recently:
- https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7529
- https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7966
though these are in 3.25, not 3.24.