Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 322831

Summary: sys-devel/gcc-4.5.0 create invalid binaries with -fdelayed-branch on parisc
Product: Gentoo Linux Reporter: Guy Martin (RETIRED) <gmsoft>
Component: [OLD] GCC PortingAssignee: HPPA Porters <hppa>
Status: RESOLVED FIXED    
Severity: normal CC: toolchain
Priority: High    
Version: unspecified   
Hardware: HPPA   
OS: Linux   
URL: http://thread.gmane.org/gmane.linux.ports.parisc/2903
See Also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44469
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 365935    
Bug Blocks: 915000    
Attachments: Stripped down version of gengenrtl which triggers the issue

Description Guy Martin (RETIRED) gentoo-dev 2010-06-05 11:41:17 UTC
While trying to build gcc-4.5.0, I've got the following error :

build/gengenrtl -h > tmp-genrtl.h
/bin/sh: line 1:  2767 Segmentation fault      build/gengenrtl > tmp-genrtl.c
make[3]: *** [s-genrtl] Error 139

emerging gcc with BOOT_CFLAGS="-O2 -fno-delayed-branch" solves the issue.
Comment 1 Guy Martin (RETIRED) gentoo-dev 2010-06-05 11:43:39 UTC
Created attachment 234185 [details]
Stripped down version of gengenrtl which triggers the issue

Added stripped down version of gengenrtl.c to repro the issue.

Observed behavior :

gcc -O2  -> Segv
gcc -O2 -fno-delayed-branch -> OK
gcc -O1 -> OK
gcc -O1 -freorder-blocks -> Segv
gcc -O1 -freorder-blocks -fno-delayed-branch -> OK
gcc -O0 -freorder-blocks -fdelayed-branch -> OK
Comment 2 Guy Martin (RETIRED) gentoo-dev 2010-08-02 17:42:24 UTC
This seems to be similar to PR 44469 : http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44469
The testcase is quite similar to the one I've attached but the workaround doesn't seem to help. I'm doublechecking right now.
Comment 3 Ryan Hill (RETIRED) gentoo-dev 2011-02-13 08:17:53 UTC
What's the verdict?
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2011-07-14 23:10:55 UTC
According to the upstream bug report, it should be in 4.5.3, which was released months ago but isn't in the tree yet.
Comment 5 Ryan Hill (RETIRED) gentoo-dev 2011-08-06 01:08:25 UTC
Fixed in 4.5.3.