I've made a small test program in a single cpp file. I've sent the binary to one of my friend and it works as expected. So it seems the problem is with my computer.
Can it be a driver bug? If so where should I ask/report the bug? Btw, I have a Radeon HD 6670.