[Bug target/88435] Compiling with optimizations causes the compiler to fail.

2018-12-11 Thread mattis at mattisborgen dot se
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88435

Mattis Lind  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #3 from Mattis Lind  ---
I can confirm that latest 9.0 doesn't have this problem.

[Bug target/88435] Compiling with optimizations causes the compiler to fail.

2018-12-10 Thread pkoning at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88435

--- Comment #2 from pkoning at gcc dot gnu.org ---
I don't see it in the current V9, rev 266823.

./xgcc -B. -O2 -S ~/Documents/pr88435.c -m10 
cat pr88435.s 

.text
.even
.globl  _pollConsole
_pollConsole:
mov @$-0220,r0
mov $011,r1
L_4:
clc
ror r0
dec r1
bne L_4
bic $-02,r0
rts pc

Clearly this is not optimal -- it shouldn't do this with a shift but rather
using a "BIT" instruction.  But the code does produce the correct answer and
the compiler doesn't fail.