Actually GCC historically can cause otherwise 100% reliable machines to show latent hardware faults, which is why it's an excellent ultimate judge for overclocking (particularly when building something large and complex like MESS). In this case it only happens on XP: the same compiler binary building the same MESS source tree will succeed 100% on Vista, Server 2008, or Win7.

Splitting megadriv.c into separate drivers/ and video/ would probably solve the issue permanently (unlike the various cargo-cult "fixes" on offer in this and other threads).