User account creation filtered due to spam.

Bug 11001 - global register %edi versus string builtins
Summary: global register %edi versus string builtins
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 3.3
: P2 normal
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
: 11002 33096 33663 (view as bug list)
Depends on:
Blocks: 8092
  Show dependency treegraph
 
Reported: 2003-05-27 21:59 UTC by Andrew Pinski
Modified: 2007-10-14 09:36 UTC (History)
4 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail: 4.0.0
Last reconfirmed: 2005-12-28 06:34:10


Attachments
test (26.63 KB, application/x-macbinary)
2003-05-27 22:03 UTC, Andrew Pinski
Details
testcase (26.57 KB, application/octet-stream)
2003-05-28 12:47 UTC, Andrew Pinski
Details
reduced testcase (239 bytes, text/plain)
2003-05-28 17:47 UTC, Giovanni Bajo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2003-05-27 21:59:08 UTC
gcc -O engine.i

engine.i:2766: warning: conflicting types for built-in function `vprintf'
engine.i:2769: warning: conflicting types for built-in function `vsprintf'
engine.i:2779: warning: conflicting types for built-in function `vsnprintf'
engine.i: In function `engine':
engine.i:17413: warning: assignment makes pointer from integer without a cast
engine.i:20529: error: unable to find a register to spill in class `DIREG'
engine.i:20529: error: this is the insn:
(insn 7239 14735 7240 372 0x402eb5ac (parallel [
            (set (reg:SI 2 ecx [987])
                (unspec:SI [
                        (mem:BLK (reg/f:SI 3 ebx [orig:989 c_addr2 ] [989]) [0 A8])
                        (reg:QI 0 al [991])
                        (const_int 1 [0x1])
                        (reg:SI 2 ecx [990])
                    ] 20))
            (use (reg:SI 19 dirflag))
            (clobber (reg/f:SI 3 ebx [orig:989 c_addr2 ] [989]))
            (clobber (reg:CC 17 flags))
        ]) 481 {strlenqi_1} (insn_list 7235 (insn_list 7236 (insn_list 7237 (insn_list 7238 
(nil)))))
    (expr_list:REG_DEAD (reg:SI 19 dirflag)
        (expr_list:REG_DEAD (reg:SI 2 ecx [990])
            (expr_list:REG_DEAD (reg:QI 0 al [991])
                (expr_list:REG_DEAD (reg/f:SI 3 ebx [orig:989 c_addr2 ] [989])
                    (expr_list:REG_UNUSED (reg/f:SI 3 ebx [orig:989 c_addr2 ] [989])
                        (expr_list:REG_UNUSED (reg:CC 17 flags)
                            (nil))))))))
engine.i:20529: internal compiler error: in spill_failure, at reload1.c:1921
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


see bug 8092 for how it was discovered.
Comment 1 Andrew Pinski 2003-05-27 22:02:10 UTC
*** Bug 11002 has been marked as a duplicate of this bug. ***
Comment 2 Andrew Pinski 2003-05-27 22:04:00 UTC
Created attachment 4096 [details]
test
Comment 3 Giovanni Bajo 2003-05-28 10:16:38 UTC
Subject: Re:  [3.3/3.4 regression] unable to find a register in class `DIREG'

pinskia@physics.uc.edu <gcc-bugzilla@gcc.gnu.org> wrote:

> ------- Created an attachment (id=4096)
>  --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4096&action=view)


I cannot extract the attachment. MIME type is application/x-macbinary, and
after downloading bzip2 says "not a bzip2 file".

Giovanni Bajo

Comment 4 Andrew Pinski 2003-05-28 12:42:29 UTC
Comment on attachment 4096 [details]
test

stupid IE.
Comment 5 Andrew Pinski 2003-05-28 12:47:01 UTC
Created attachment 4099 [details]
testcase

Hopefully Netscape 4.7 is better than IE for the Mac.
Comment 6 Giovanni Bajo 2003-05-28 17:28:30 UTC
reducing...
Comment 7 Giovanni Bajo 2003-05-28 17:47:11 UTC
Created attachment 4101 [details]
reduced testcase
Comment 8 Giovanni Bajo 2003-05-28 17:49:01 UTC
I have attached the reduced testcase. It's not a regression since it ICEs GCC 
since at least 2.95.
Comment 9 Andrew Pinski 2003-07-14 15:16:40 UTC
Actually this code is invalid because it jumps out of a Statement expression but it still ICE 
even after changing the Statement expression to just a statement on the mainline 
(20030711) so it still is a bug.
Comment 10 Andrew Pinski 2004-01-01 08:07:14 UTC
Only fails at -O1.
Comment 11 Andrew Pinski 2007-08-17 09:03:37 UTC
*** Bug 33096 has been marked as a duplicate of this bug. ***
Comment 12 Uroš Bizjak 2007-10-05 06:05:21 UTC
*** Bug 33663 has been marked as a duplicate of this bug. ***
Comment 13 Nathan Froyd 2007-10-12 16:12:57 UTC
Subject: Bug 11001

Author: froydnj
Date: Fri Oct 12 16:12:45 2007
New Revision: 129265

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129265
Log:
gcc/
	PR 11001
	* config/i386/i386.md (strmov): Check for esi and edi usage.
	* config/i386/i386.c (decide_alg): Check whether we can use a
	rep prefix and adjust algorithm choice accordingly.
	(ix86_expand_strlen): Check for eax, ecx, and edi usage.

gcc/testsuite/
	PR 11001
	* gcc.target/i386/pr11001-strlen-1.c: New testcase.
	* gcc.target/i386/pr11001-strlen-2.c: New testcase.
	* gcc.target/i386/pr11001-strlen-3.c: New testcase.
	* gcc.target/i386/pr11001-memset-1.c: New testcase.
	* gcc.target/i386/pr11001-memset-2.c: New testcase.
	* gcc.target/i386/pr11001-memset-3.c: New testcase.
	* gcc.target/i386/pr11001-memcpy-1.c: New testcase.
	* gcc.target/i386/pr11001-memcpy-2.c: New testcase.
	* gcc.target/i386/pr11001-memcpy-3.c: New testcase.


Added:
    trunk/gcc/testsuite/gcc.target/i386/pr11001-memcpy-1.c
    trunk/gcc/testsuite/gcc.target/i386/pr11001-memcpy-2.c
    trunk/gcc/testsuite/gcc.target/i386/pr11001-memcpy-3.c
    trunk/gcc/testsuite/gcc.target/i386/pr11001-memset-1.c
    trunk/gcc/testsuite/gcc.target/i386/pr11001-memset-2.c
    trunk/gcc/testsuite/gcc.target/i386/pr11001-memset-3.c
    trunk/gcc/testsuite/gcc.target/i386/pr11001-strlen-1.c
    trunk/gcc/testsuite/gcc.target/i386/pr11001-strlen-2.c
    trunk/gcc/testsuite/gcc.target/i386/pr11001-strlen-3.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/config/i386/i386.md
    trunk/gcc/testsuite/ChangeLog

Comment 14 Uroš Bizjak 2007-10-14 09:36:31 UTC
Fixed.