Also shows 0 on MinGW-W64. But both MinGW-W64 and the MinGW built by MSYS2 are not supported by the MinGW project itself.
So I would imagine you should bring it up with MSYS2 since that's who built the compiler you're using.
Looks like this might be the place? https://github.com/msys2/mingw-packages/issues