Bug 36686 - [4.3 regression] qt-4.3.4 compile failure with message "unable to find a register to spill in class 'R0_REGS'"
Summary: [4.3 regression] qt-4.3.4 compile failure with message "unable to find a regi...
Status: RESOLVED DUPLICATE of bug 36684
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2008-07-01 10:09 UTC by CHIKAMA Masaki
Modified: 2008-07-02 04:06 UTC (History)
2 users (show)

See Also:
Host:
Target: sh4-*-linux
Build: sh4-redhat-linux
Known to work:
Known to fail: 4.3.1 4.4.0
Last reconfirmed:


Attachments
preprocessed file generated by adding -save-temps (35.79 KB, text/plain)
2008-07-01 10:13 UTC, CHIKAMA Masaki
Details
preprocessed file without precompiled headers (225.19 KB, application/octet-stream)
2008-07-02 03:20 UTC, CHIKAMA Masaki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description CHIKAMA Masaki 2008-07-01 10:09:49 UTC
gcc-4.3.0 fails to compile with this message when compiling 
qt-4.3.4. gcc-4.1.3 can compile without fail.
They are both natively running on sh4 board.

The message is very similar with Bug #36684. They may have the same root cause.


g++ -c -include .pch/release-shared/QtGui -pipe -fno-exceptions -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -O2 -g -mieee -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_BUILD_GUI_LIB -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_44_API_QSQLQUERY_FINISH -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_RASTER_IMAGEENGINE -DQT_NO_STYLE_MAC -DQT_NO_STYLE_WINDOWSVISTA -DQT_NO_STYLE_WINDOWSXP -DQ_INTERNAL_QAPP_SRC -DQT_NO_DEBUG -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/linux-g++ -I. -I../../include/QtCore -I../../include/QtCore -I../../include -I../../include/QtGui -I/usr/include/freetype2 -I../3rdparty/harfbuzz/src -Idialogs -I.moc/release-shared -I/usr/X11R6/include -I.uic/release-shared -o .obj/release-shared/qcolordialog.o dialogs/qcolordialog.cpp
In file included from dialogs/qcolordialog.cpp:1717:
dialogs/qcolordialog.cpp: In member function 'virtual QSize QColorPicker::sizeHint() const':
dialogs/qcolordialog.cpp:834: error: unable to find a register to spill in class 'R0_REGS'
dialogs/qcolordialog.cpp:834: error: this is the insn:
(insn:HI 25 53 26 2 dialogs/qcolordialog.cpp:833 (set (reg:SI 1 r1 [orig:178 pHeight ] [178])
        (mem/c/i:SI (plus:SI (reg/f:SI 1 r1 [175])
                (reg:SI 12 r12)) [11 pHeight+0 S4 A32])) 172 {movsi_ie} (expr_list:REG_DEAD (reg/f:SI 1 r1 [175])
        (nil)))
dialogs/qcolordialog.cpp:834: confused by earlier errors, bailing out
make[1]: *** [.obj/release-shared/qcolordialog.o] Error 1
make[1]: Leaving directory `/builddir/build/BUILD/qt-x11-opensource-src-4.3.4/src/gui'


# /usr/bin/gcc -v
Using built-in specs.
Target: sh4-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++,java,fortran --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--build=sh4-redhat-linux
Thread model: posix
gcc version 4.3.0 20080404 (Red Hat 4.3.0-6.fs1.1) (GCC)
Comment 1 CHIKAMA Masaki 2008-07-01 10:13:45 UTC
Created attachment 15839 [details]
preprocessed file generated by adding -save-temps
Comment 2 Kazumoto Kojima 2008-07-02 00:20:21 UTC
Could you please send the testcase without using precompiled headers?
See http://gcc.gnu.org/bugs.html#pch.

I also suspect this is a duplicate of PR36684.  Does -fno-schedule-insns
get rid of this error?
Comment 3 CHIKAMA Masaki 2008-07-02 03:14:41 UTC
>Could you please send the testcase without using precompiled headers?
Do you mean that I should redo without "-include .pch/release-shared/QtGui" ?
I'll attach in next post.

>Does -fno-schedule-insns get rid of this error?
Yes. It passed without failure.
Is this a workaround or right fix ?
Comment 4 CHIKAMA Masaki 2008-07-02 03:20:42 UTC
Created attachment 15842 [details]
preprocessed file without precompiled headers

gzipped beacuse plain text file's size is 1.5MB
Comment 5 Kazumoto Kojima 2008-07-02 03:47:40 UTC
Thanks for the updated testcase.  I've confirmed that this PR is
a duplicate of PR36684 as you suggested.

> Is this a workaround or right fix ?

SH backend enables first insn scheduling pass for SH4 when
the estimated R0 register pressure is low.  PR36684 reveals that
it doesn't work well for PIC which will make many implicit R0 uses.
It seems that there is no easy way to compute accurate R0 register
pressure in that case.  Also this optimization doesn't make much
difference in performance for such case.  So disabling it for PIC
would be a reasonable fix, I guess.  I'll prepare such patch for
PR36684.


*** This bug has been marked as a duplicate of 36684 ***
Comment 6 CHIKAMA Masaki 2008-07-02 04:06:05 UTC
Thank you.
I'll learn more about background of this problem 
along with your comment.