I have checked my task manager, gcc is terminated.
gcc and codeblocks works all as expected. Your problem is that the gcc can not write to your output file. This can have this reasons:
1) Windows is blocking the write access
a) The file is write protected
b) The file is in a special path where you don't have write access
c) Windows blocks the write access because the executable is currently running
2) The anti virus is blocking the write access to the executable (not the firewall but the normal anti virus... avast, avg or whatever...)
So you have nothing to change in codeblocks.. Can you delete the executable from the explorer?