[MPlayer-advusers] [OT] gcc optimization problem

Julián Nuñez julian.dia3 at gmail.com
Wed May 25 17:58:19 CEST 2005


Hi, sorry for posting this here, but I need some GCC expert to explain 
this to me, please...
The attached piece of code works well without optimization: gcc test.c
i val 0
i val 1
i val 2

but using optimization: gcc -O2 test.c
i val 0
i val 1
i val 3

It gives wrong results.
gcc (GCC) 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)

A friend of mine did try it with GCC 2.95 and it works well.
What can be happening? should I upgrade to gcc 3.4?
Thanks in advance and sorry if I wasted your time.

-- 
"El verdadero valor esta en hacer sin testigos,
lo que podría hacerse delante de todo el mundo"

"What difference does it make to the dead, the orphans and the
homeless, whether the mad destruction is wrought under the name of
totalitarianism or the holy name of liberty or democracy?"
    Mahatma Gandhi (1869 - 1948), "Non-Violence in Peace and War"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: text/x-csrc
Size: 523 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-advusers/attachments/20050525/fd8b4f77/attachment.c>


More information about the MPlayer-advusers mailing list