I have just tried the testcase attached with the bug report, on both MinGW 4.whatever and 5.0.2 (the latest and greatest). In both instances, the test passed (in other words, this exact bug is not present in MinGW 4.) Very strange since g++ in MinGW4 is
3.4.2, which predates this bug report.
By the way, MinGW 5.0.2 and Msys 1.0.10 work fine for me.