First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 203543
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Toolchain Maintainers <toolchain@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Robin Johnson <robbat2@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
gcc-hppa-PR34627.patch Patch against 4.1.2 patch Guy Martin 2008-02-04 17:10 0000 623 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 203543 depends on: Show dependency tree
Bug 203543 blocks: 193134 256430
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-12-28 05:52 0000
This was originally thought a bug in Git on HPPA, but it seems to be a GCC bug.

Here is the smallest GCC testcase I could come up with that exhibits the issue:
int ret1() { return -1 }
int main(int argc, char **argv) {
        int i = ret1();
        if(i >= -10000) { i = -i; } // should execute
        return i+10;
}

And I used it as follows:
for i in 0 1 2 3 ; do hppa2.0-unknown-linux-gnu-gcc -o test2  -save-temps -Wall
 test2.c -O${i} && cp test2.s test2-O${i}.s && ./test2 ; echo $? ; done ;
11
9
9
11

'11' is the correct value.

-O3 gives the correct value only because it converts the entire program to
'return 11';

Other systems (amd64, x86, ppc) get it correct. (I used return i+10 to avoid
any side effects from a call to printf).

This was on hake.hppa.dev.gentoo.org.
Portage 2.1.4_rc11 (default-linux/hppa/2007.0/server, gcc-4.1.2, glibc-2.5-r4,
2.6.22.6 parisc)
=================================================================
System uname: 2.6.22.6 parisc PA8600 (PCX-W+)
Timestamp of tree: Thu, 27 Dec 2007 08:00:03 +0000
ccache version 2.3 [enabled]
app-shells/bash:     3.2_p17
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.3
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3, 2.17, 2.17.50.0.9, 2.17.50.0.11, 2.17.50.0.12,
2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r2
ACCEPT_KEYWORDS="hppa"
CBUILD="hppa2.0-unknown-linux-gnu"
CFLAGS="-march=2.0 -O2 -pipe -mschedule=8000"
CHOST="hppa2.0-unknown-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo
/etc/udev/rules.d"
CXXFLAGS="-march=2.0 -O2 -pipe -mschedule=8000"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildsyspkg ccache distlocks metadata-transfer noinfo parallel-fetch
sandbox sfperms strict test unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.osuosl.org"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude=/manifest1_obsolete"
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
--filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/usr/local/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://raptor.gentoo.org/gentoo-portage"
USE="apache2 berkdb bitmap-fonts bzip2 cli cracklib crypt cups firefox
foomaticdb fortran gdbm gpm hppa iconv imlib ipv6 isdnlog libwww mailwrapper
midi mudflap multislot mysql ncurses nls nptl nptlonly openmp openntpd pcre
perl pic pppd python readline reflection session snmp spell spl ssl tcpd test
truetype truetype-fonts type1-fonts unicode xml xml2 xorg zlib"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file
hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route
share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias
authn_anon authn_dbm authn_default authn_file authz_dbm authz_default
authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs
dav_lock deflate dir disk_cache env expires ext_filter file_cache filter
headers include info log_config logio mem_cache mime mime_magic negotiation
rewrite setenvif speling status unique_id userdir usertrack vhost_alias"
ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses
text" USERLAND="GNU" VIDEO_CARDS="dummy fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL,
LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTDIR_OVERLAY

------- Comment #1 From SpanKY 2007-12-28 14:25:41 0000 -------
looks like gcc-4.3 and gcc-4.1 both fail

have you posted a report upstream ?

------- Comment #2 From Robin Johnson 2007-12-29 02:31:47 0000 -------
Not yet, will do so tonight, unless you get to it ahead of me.

------- Comment #3 From Guy Martin 2008-02-04 17:10:27 0000 -------
Created an attachment (id=142667) [details]
Patch against 4.1.2

PR fixed upstream. Attaching patch against our gcc-4.1.2

------- Comment #4 From Robin Johnson 2008-03-17 08:56:26 0000 -------
toolchain/spanky: Could you please put this into the next spin of GCC?
For both 4.1, 4.2, and 4.3 (the upstream bug has the various patches).

------- Comment #5 From SpanKY 2008-03-17 10:57:38 0000 -------
i thought this was fixed in the gcc-4.3.0 release ?

------- Comment #6 From Robin Johnson 2008-03-17 20:28:13 0000 -------
vapier: unless hppa is going with 4.3.x everywhere, can you apply the 4.1/4.2
versions to the tree as well?

------- Comment #7 From SpanKY 2008-04-12 22:19:23 0000 -------
ive added the fix to our patchset

------- Comment #8 From Jeroen Roovers 2009-01-02 19:02:44 0000 -------
1) It doesn't look like the patch ever made it into the set.
2) Greater versions should probably be patched as well.

------- Comment #9 From SpanKY 2009-01-10 10:43:01 0000 -------
i did add it to our patchset:
http://sources.gentoo.org/gentoo/src/patchsets/gcc/4.1.2/gentoo/65_all_gcc-hppa-pr34627.patch?rev=1.1

but not to the ebuild ... i dont want to put out a gcc-4.1.2-r1 with only this
new patch

if you guys dont care, i can just add the patch to gcc-4.1.2.ebuild

------- Comment #10 From Jeroen Roovers 2009-01-20 15:17:14 0000 -------
sys-devel/gcc-4.2.4-r1 fixes bug #193134 ...

------- Comment #11 From SpanKY 2009-01-28 00:59:22 0000 -------
so, things should be in latest 4.[123].x versions ... how hppa wants to handle
stabilization is up to them

First Last Prev Next    No search results available      Search page      Enter new bug