Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 120159 - gforth emerge gives errors unless -O0 set
Summary: gforth emerge gives errors unless -O0 set
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Matthew Kennedy (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-24 03:31 UTC by William S.
Modified: 2006-08-03 12:29 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William S. 2006-01-24 03:31:09 UTC
Any attempt to emerge the package gforth with an optimization setting other than -O0 gives the error:
engine.c:340: error: unable to find a register to spill in class `SIREG'
engine.c:340: error: this is the insn:
(insn:HI 14251 14249 14271 998 0xb7a34aa8 (parallel [
            (set (reg:SI 2 ecx [2660])
                (const_int 0 [0x0]))
            (set (reg/f:SI 5 edi [2658])
                (plus:SI (reg/v/f:SI 2621)
                    (reg/v:SI 1 edx [2629])))
            (set (reg/f:SI 0 eax [2659])
                (plus:SI (reg/v/f:SI 2628)
                    (reg/v:SI 1 edx [2629])))
            (set (mem:BLK (reg/v/f:SI 2621) [0 A8])
                (mem:BLK (reg/v/f:SI 2628) [0 A8]))
            (use (reg/v:SI 1 edx [2629]))
            (use (reg:SI 19 dirflag))
        ]) 455 {rep_movqi} (insn_list 14249 (nil))
    (expr_list:REG_DEAD (reg:SI 19 dirflag)
        (expr_list:REG_DEAD (reg/v/f:SI 2628)
            (expr_list:REG_UNUSED (reg:SI 2 ecx [2660])
                (expr_list:REG_UNUSED (reg/f:SI 5 edi [2658])
                    (expr_list:REG_UNUSED (reg/f:SI 0 eax [2659])
                        (nil)))))))

emerge --info:
Portage 2.0.53 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r2, 2.6.14-gent
oo-r5 i686)
=================================================================
System uname: 2.6.14-gentoo-r5 i686 AMD Duron(tm) Processor
Gentoo Base System version 1.6.14
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share
/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/shar
e/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-Os -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="x86 X aac alsa apm arts audiofile avi berkdb bitmap-fonts bzip2 crypt eds e
mboss encode expat fam foomaticdb fortran gdbm gif glut gnome gpm gstreamer gtk 
gtk2 idn imlib ipv6 jpeg kde lcms libg++ libwww mad mikmod mng motif mp3 mpeg nc
urses nls ogg oggvorbis opengl pam pcre pdflib perl png python qt quicktime read
line recode sdl spell ssl tcpd truetype truetype-fonts type1-fonts udev vorbis x
ml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Matthew Kennedy (RETIRED) gentoo-dev 2006-02-14 15:29:45 UTC
Is that a GCC internal compiler error?
Comment 2 Graham Murray 2006-02-16 10:33:07 UTC
If it is an internal compiler error then gcc 3.4.5 exhibits the same error here.
Comment 3 Sven E. 2006-03-10 16:35:32 UTC
It looks like an ICE, funny enough though it's present on all gcc versions (3.4 through 4.1) - Aside from being able to reproduce it, I got 0.6.2 (not r1) emerged, can't remember though which gcc version ... so, obviously something was broken from 0.6.2 to 9.6.2-r1) ...
Comment 4 William S. 2006-03-25 18:21:42 UTC
http://www.public.iastate.edu/~forth/gforth_141.html

I think this may have something to do with it.  Specifically:
"However, register allocation cannot be portably influenced by the programmer, leading to some inefficiencies on register-starved machines. We use explicit register declarations (see section `Variables in Specified Registers' in GNU C Manual) to improve the speed on some machines. They are turned on by using the configuration flag --enable-force-reg (gcc switch -DFORCE_REG). Unfortunately, this feature not only depends on the machine, but also on the compiler version: On some machines some compiler versions produce incorrect code when certain explicit register declarations are used. So by default -DFORCE_REG is not used."
Comment 5 Matthew Kennedy (RETIRED) gentoo-dev 2006-04-08 16:49:32 UTC
Without specific knowledge which architectures and compiler version combinations are compatible with --enable-force-reg, I propose to include a new (local) USE flag "force-reg" which the user can add to their USE flags when they know --enable-force-reg is compatible with their architecture/compiler version combination.
Comment 6 Matthew Kennedy (RETIRED) gentoo-dev 2006-04-08 17:03:13 UTC
using --disable-force-reg still causes GCC to error w/ -Os, -O0 but not >= -O2
Comment 7 Matthew Kennedy (RETIRED) gentoo-dev 2006-05-12 13:28:09 UTC
Added new use flag "force-reg" to --enable-force-reg to configure.  Added some CFLAGS filtering.  Please test and let me know if there's any more problems.
Comment 8 Graham Murray 2006-05-13 09:04:24 UTC
(In reply to comment #7)
> Added new use flag "force-reg" to --enable-force-reg to configure.  Added some
> CFLAGS filtering.  Please test and let me know if there's any more problems.

Sorry but still fails here both with and without the new 'force-reg'  use flag.


Comment 9 Matthew Kennedy (RETIRED) gentoo-dev 2006-05-13 10:27:34 UTC
Please post emerge info
Comment 10 Graham Murray 2006-05-13 11:28:17 UTC
emerge --info
Portage 2.1_pre10-r5 (default-linux/x86/2006.0, gcc-4.1.0, glibc-2.4-r3, 2.6.16-gentoo-r7 i686)
=================================================================
System uname: 2.6.16-gentoo-r7 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz
Gentoo Base System version 1.12.0_pre19
dev-lang/python:     2.3.5, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=nocona -mtune=nocona -pipe -ggdb"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O2 -march=nocona -mtune=nocona -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms splitdebug strict"
GENTOO_MIRRORS="http://gentoo.mirror.solnet.ch ftp://mirror.ovh.net/gentoo-distfiles/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://gentoo.ngi.it http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/"
LANG="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"
LINGUAS="en_GB"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X a52 aac aalib acl acpi aim alsa apache2 arts audiofile avi bash-completion berkdb bitmap-fonts bonobo browserplugin bzip2 bzlib caps cdparanoia cdr cjk cli crypt cups curl dbus doc dri dts dvd dvdr dvdread eds emacs emboss encode esd ethereal examples exif expat fam fbcon ffmpeg flac foomaticdb fortran gcj gd gdbm gif glut gmp gnome gnutls gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile hal iconv icq idn ieee1394 imagemagick imlib ipv6 isdnlog jabber jack java javascript jce jpeg junit kde lcms leim libg++ libgda libwww lm_sensors logrotate mad mbox mikmod milter mime mmap mmx mng motif mozilla mp3 mpeg mpi msn ncurses nls nptl nsplugin offensive ogg oggvorbis openal opengl oscar oss pam pcntl pcre pdflib perl png postgres pppd profile python qt quicktime readline recode reflection ruby sdl session sharedmem sndfile snmp sockets sox speex spell spl sse ssl svg sysvipc tcltk tcpd tetex theora threads tiff truetype truetype-fonts type1-fonts udev unicode usb v4l vhosts vorbis win32codecs wmf wxwindows xface xine xml xml2 xmms xorg xv xvid yahoo zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_en_GB userland_GNU video_cards_radeon video_cards_vesa video_cards_fbdev"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS