public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13565] New: Register spill problem in x86_64 compiler
@ 2004-01-05 1:40 gcc-bugzilla at gcc dot gnu dot org
2004-01-05 4:05 ` [Bug optimization/13565] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2004-01-05 1:40 UTC (permalink / raw)
To: gcc-bugs
ICE (register spill problem) when compiling the following code:
<<<start test.cpp>>>
int x,y;
void WriteMemoryW ( int, short, int );
void opcode_DIV ()
{
WriteMemoryW ( 0, x / y, 0 );
WriteMemoryW ( 0, x % y, 0 );
}
<<<end test.cpp>>>
The following output is generated:
test.cpp: In function `void opcode_DIV()':
test.cpp:9: error: unable to find a register to spill in class `DREG'
test.cpp:9: error: this is the insn:
(insn 11 13 12 0 0x2a9564cba0 (parallel [
(set (reg:SI 0 eax [59])
(div:SI (reg:SI 0 eax [61])
(mem/f:SI (symbol_ref:DI ("y")) [0 y+0 S4 A32])))
(set (reg:SI 2 ecx [60])
(mod:SI (reg:SI 0 eax [61])
(mem/f:SI (symbol_ref:DI ("y")) [0 y+0 S4 A32])))
(clobber (reg:CC 17 flags))
]) 268 {*divmodsi4_cltd} (insn_list 10 (nil))
(expr_list:REG_DEAD (reg:SI 0 eax [61])
(expr_list:REG_UNUSED (reg:SI 2 ecx [60])
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil)))))
test.cpp:9: confused by earlier errors, bailing out
Environment:
System: Linux Marclar 2.6.0 #3 Sat Dec 20 22:16:38 EST 2003 x86_64 5
GNU/Linux
Architecture: x86_64
host: x86_64-pc-linux-gnu
build: x86_64-pc-linux-gnu
target: x86_64-pc-linux-gnu
configured with: /var/tmp/portage/gcc-3.3.2-r4/work/gcc-3.3.2/configure
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/3.3
--includedir=/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.2/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.3
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.3/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.3/info
--enable-shared --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--with-system-zlib --enable-languages=c,c++,f77,objc
--enable-threads=posix --enable-long-long --disable-checking
--enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit
--enable-version-specific-runtime-libs
--with-gxx-include-dir=/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.2/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext --enable-multilib
How-To-Repeat:
Using the following command line:
gcc -c -O -fschedule-insns test.cpp
------- Additional Comments From marc at mrousseau dot org 2004-01-05 01:40 -------
Fix:
Removing either the -O or -fschedule-insns arugments will allow the code
to compile.
Observation: changing the 2nd argument to the WriteMemoryW function to
an int rather than short fixes the problem as well.
--
Summary: Register spill problem in x86_64 compiler
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: marc at mrousseau dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: x86_64-pc-linux-gnu
GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13565
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug optimization/13565] Register spill problem in x86_64 compiler
2004-01-05 1:40 [Bug c++/13565] New: Register spill problem in x86_64 compiler gcc-bugzilla at gcc dot gnu dot org
@ 2004-01-05 4:05 ` pinskia at gcc dot gnu dot org
2004-03-31 10:18 ` hubicka at gcc dot gnu dot org
2005-05-09 14:51 ` [Bug rtl-optimization/13565] " pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-05 4:05 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-05 04:05 -------
Confirmed on the mainline.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|c++ |optimization
Ever Confirmed| |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2004-01-05 04:05:24
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13565
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug optimization/13565] Register spill problem in x86_64 compiler
2004-01-05 1:40 [Bug c++/13565] New: Register spill problem in x86_64 compiler gcc-bugzilla at gcc dot gnu dot org
2004-01-05 4:05 ` [Bug optimization/13565] " pinskia at gcc dot gnu dot org
@ 2004-03-31 10:18 ` hubicka at gcc dot gnu dot org
2005-05-09 14:51 ` [Bug rtl-optimization/13565] " pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2004-03-31 10:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From hubicka at gcc dot gnu dot org 2004-03-31 10:18 -------
This is usual problem of -fschedule-insns and small register classes machines. It never worked and probably we ought to at least document this defect.
Honza
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13565
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug rtl-optimization/13565] Register spill problem in x86_64 compiler
2004-01-05 1:40 [Bug c++/13565] New: Register spill problem in x86_64 compiler gcc-bugzilla at gcc dot gnu dot org
2004-01-05 4:05 ` [Bug optimization/13565] " pinskia at gcc dot gnu dot org
2004-03-31 10:18 ` hubicka at gcc dot gnu dot org
@ 2005-05-09 14:51 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-09 14:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-09 14:50 -------
*** This bug has been marked as a duplicate of 9085 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13565
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-05-09 14:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-05 1:40 [Bug c++/13565] New: Register spill problem in x86_64 compiler gcc-bugzilla at gcc dot gnu dot org
2004-01-05 4:05 ` [Bug optimization/13565] " pinskia at gcc dot gnu dot org
2004-03-31 10:18 ` hubicka at gcc dot gnu dot org
2005-05-09 14:51 ` [Bug rtl-optimization/13565] " pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).