I'm using 4.7, directly from the MinGW sourceforge page, and Code::Blocks SVN 8120 (or something)
I downloaded Windows 32 bits - GCC SJLJ (Code::Blocks) (15.7 MB)
I tried Windows 32 bits - GCC DW2 (11.5 MB) just now, and same problem.
if you look at the debugger error, it says I'm calling VideoMode with 600, 32, 2 instead of 800, 600, 32.