[Bug target/42553] wrong code with -O1

2010-01-04 Thread ubizjak at gmail dot com
--- Comment #3 from ubizjak at gmail dot com 2010-01-04 16:07 --- (In reply to comment #2) The inline-asm is totally incorrect here ... Actually, the asm is correct, it is just a couple of volatiles that are missing. Please see arch/x86/include/asm/bitops.h from linux-2.6 for correct

[Bug target/42553] wrong code with -O1

2009-12-30 Thread pinskia at gmail dot com
--- Comment #1 from pinskia at gmail dot com 2009-12-30 13:14 --- Subject: Re: New: wrong code with -O1 Sent from my iPhone On Dec 30, 2009, at 7:56 AM, debian-gcc at lists dot debian dot org gcc-bugzi...@gcc.gnu.org wrote: current trunk/branches on x86_64-linux-gnu. return

[Bug target/42553] wrong code with -O1

2009-12-30 Thread pinskia at gcc dot gnu dot org
--- Comment #2 from pinskia at gcc dot gnu dot org 2009-12-30 14:33 --- The inline-asm is totally incorrect here is the corrected version of the function (note res should be set): static bool atomic_test_and_reset_bit(unsigned long *v,unsigned long bit) { bool res = 0; __asm__