Good question. I firmly believe this is a bug in GCC win32 (in my case MinGW), although specifics are hard to determine, so I'm not sure if there's an existing bug report for it or I'd quote it here. It seems to affect very few people since I've seen no mention of it elsewhere.
Evidence I have a complex running application that I've been developing for some time; but every now and then, even with a trivial incremental change (one line, error-free), GCC will lock up in the command prompt (with Admin permissions) which sometimes can be closed, whereas other times neither the close button nor Task Manager nor Windows shutdown can release the process; attempting to run GCC in another command prompt fails similarly. I must then force reboot. Following reboot, some sort of cache or gcc application state must have been cleared, since compilation then goes off without a hitch. gcc -v
returns:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32 --build=m
ingw32 --without-pic --enable-shared --enable-static --with-gnu-ld --enable-lto
--enable-libssp --disable-multilib --enable-languages=c,c++,fortran,objc,obj-c++
,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry --enable-l
ibstdcxx-debug --enable-version-specific-runtime-libs --with-gmp=/usr/src/pkg/gm
p-5.1.2-1-mingw32-src/bld --with-mpc=/usr/src/pkg/mpc-1.0.1-1-mingw32-src/bld --
with-mpfr= --with-system-zlib --with-gnu-as --enable-decimal-float=yes --enable-
libgomp --enable-threads --with-libiconv-prefix=/mingw32 --with-libintl-prefix=/
mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T
Thread model: win32
gcc version 4.8.1 (GCC)
P.S. According to this question, GCC is probably locked waiting on a kernel resource. This may be due to the way it attempts to access Windows kernel resources vs. Linux, insofar as having been ported from the latter.
P.P.S. If this is not a GCC bug then the OP and I have some OS issues in common.