http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55491
--- Comment #5 from tom.day at amlin dot co.uk 2012-11-27 18:20:09 UTC --- Thanks for comments and sorry if original post was at all unclear. The error I got was from gcc hosted on mingw32 and, as per Mikael's comment, I noticed that omitting the -O2 option made it run correctly.