[Bug target/8972] [arc-7-elf] the c code ' x << i' causes infinite loop when i = 0

or.poran@intel.com gcc-bugzilla@gcc.gnu.org
Tue May 27 06:21:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8972



------- Additional Comments From or.poran@intel.com  2003-05-27 06:15 -------
Subject: RE:  [arc-7-elf] the c code ' x << i' causes inf
	inite loop when i = 0

I'm sorry but my bug report wasn't complete...
the code as I presented in my bug report was generated using -O3 flag.
This code is generated without optimization. and it is correct, I possible
solution could be to block optimization for this op.
Is there any intention to fix the bug?

-----Original Message-----
From: dhazeghi@yahoo.com [mailto:gcc-bugzilla@gcc.gnu.org]
Sent: Monday, May 26, 2003 11:44 PM
To: Poran, Or
Subject: [Bug target/8972] [arc-7-elf] the c code ' x << i' causes infinite
loop when i = 0


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8972



------- Additional Comments From dhazeghi@yahoo.com  2003-05-26 20:44
-------
Hello,

gcc 3.3 branch and mainline (20030524) generate the following code for your
testcase. Is this 
code correct? Thanks,

Dara

        .cpu base
        .section .text
        .align 4
        .global _f
        .type   _f, @function
_f:
        ; BEGIN PROLOGUE ; vars= 8, regs= 0, args= 0, extra= 16
        st fp,[sp]
        mov fp,sp
        sub sp,sp,24
        ; END PROLOGUE
        st r0,[fp,-4]
        st r1,[fp,-8]
        ld r3,[fp,-4]
        ld r2,[fp,-8]
        mov r4,r2
1:      ; begin shift loop
        sub.f r4,r4,1
        nop
        bn.nd 2f
        asl r3,r3
        b.nd 1b
2:      ; end shift loop
        mov r2,r3
        mov r0,r2
        ; EPILOGUE
        j.d blink
        ld.a fp,[sp,24]
        .size   _f, .-_f
        .ident  "GCC: (GNU) 3.3.1 20030524 (prerelease)"




------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.




------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the Gcc-bugs mailing list