Bug 688767

Summary: lto1: internal compiler error: in lto_wpa_write_files with -O2 -flto
Product: [Fedora] Fedora Reporter: Bastiaan Jacques <bastiaan>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: hicham.haouari, jakub
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gcc-4.6.0-4.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-01 21:35:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
compilation units that fail to link with -O2 -flto none

Description Bastiaan Jacques 2011-03-17 23:25:06 UTC
Created attachment 486120 [details]
compilation units that fail to link with -O2 -flto

Version-Release number of selected component (if applicable):
gcc-c++-4.6.0-0.12.fc15.i686


How reproducible:

Every time.


Steps to Reproduce:
1. Unpack the attached tarball.
2. Execute: g++ -O2 -flto -o gtk-gnash gtk_gnash-gnash.o gtk_gnash-gui.o gtk_gnash-Player.o  gtk_gnash-ScreenShotter.o libgnashcore.so
3. Observe ICE.
  
Actual results:
Internal Compiler Error.

Expected results:
Linking error (no errors in original setup).

Additional info:

I have tried to reduce the link command as much as possible by removing depedent libraries and compilation unites from the link line. (Though this of course would lead to linker errors when g++ invokes the linker.) To retrace my steps entirely, one would download Gnash from git and build with CXXFLAGS="-O2 -flto". If the project is built with -O1 -flto rather than -O2 -flto, compilation and linking succeeds.

GCC from Fedora 15, last updated Fri Mar 04 2011:

Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.6.0/lto-wrapper
Target: i686-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-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-java-awt=gtk --disable-dssi --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 --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux
Thread model: posix
gcc version 4.6.0 20110304 (Red Hat 4.6.0-0.12) (GCC)

Comment 1 Hicham HAOUARI 2011-03-18 20:48:09 UTC
I can't reproduce this issue, I only have linking errors ( as expected )

Comment 2 Bastiaan Jacques 2011-04-01 21:35:21 UTC
Fixed upstream and in updates-testing for f15.

Comment 3 Fedora Update System 2011-04-08 10:16:00 UTC
gcc-4.6.0-3.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/gcc-4.6.0-3.fc15

Comment 4 Fedora Update System 2011-04-13 20:02:12 UTC
gcc-4.6.0-4.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/gcc-4.6.0-4.fc15

Comment 5 Fedora Update System 2011-04-15 21:43:31 UTC
gcc-4.6.0-4.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.