Bug 756138

Summary: g++ internal compiler error compiling Rosetta 3.3 (-O2/-O3, fine with -O0/-O1)
Product: Red Hat Enterprise Linux 6 Reporter: Tru Huynh <pasteur>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1CC: mpolacek, pmuller, toracat
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: gcc-4.4.6-4.el6 Doc Type: Bug Fix
Doc Text:
Previously GCC, when removing path in control flow graph, could accidentally cancel loops twice which resulted in internal compiler error. This has been fixed so now the loops are cancelled once.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 14:39:37 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
Preprocessed source (-O2)
none
rh756138.ii none

Description Tru Huynh 2011-11-22 19:32:51 UTC
Description of problem:
g++ segfault

Version-Release number of selected component (if applicable):
gcc-c++-4.4.5-6.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.g++ -o build/src/release/linux/2.6/64/x86/gcc/protocols/nonlocal/NonlocalAbinitioReader.os -c -isystem external/boost_1_46_1/boost/ -isystem external/boost_1_46_1/boost/ -O2 -ffast-math -funroll-loops -finline-functions -finline-limit=20000 -s -Wno-unused-variable -fPIC -DNDEBUG -Isrc -Iexternal/include -Isrc/platform/linux/64/gcc -Isrc/platform/linux/64 -Isrc/platform/linux -Iexternal/boost_1_46_1 -Iexternal/dbio -I/usr/local/include -I/usr/include src/protocols/nonlocal/NonlocalAbinitioReader.cc
2.
3.
  
Actual results:
segfault

Expected results:
no errors

Additional info:

Comment 1 Tru Huynh 2011-11-22 19:34:01 UTC
[tru@c6 rosetta_source]$ g++ -o build/src/release/linux/2.6/64/x86/gcc/protocols/nonlocal/NonlocalAbinitioReader.os -c -isystem external/boost_1_46_1/boost/ -isystem external/boost_1_46_1/boost/ -O3 -ffast-math -funroll-loops -finline-functions -finline-limit=20000 -s -Wno-unused-variable -fPIC -DNDEBUG -Isrc -Iexternal/include -Isrc/platform/linux/64/gcc -Isrc/platform/linux/64 -Isrc/platform/linux -Iexternal/boost_1_46_1 -Iexternal/dbio -I/usr/local/include -I/usr/include src/protocols/nonlocal/NonlocalAbinitioReader.cc
src/protocols/nonlocal/NonlocalAbinitioReader.cc: In static member function ‘static void protocols::nonlocal::NonlocalAbinitioReader::read(const std::string&, utility::vector1<protocols::nonlocal::NLGrouping, std::allocator<protocols::nonlocal::NLGrouping> >*)’:
src/protocols/nonlocal/NonlocalAbinitioReader.cc:112: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.



Preprocessed source stored into /tmp/ccaWIybp.out file, please attach this to your bugreport.

Comment 2 Tru Huynh 2011-11-22 19:35:20 UTC
Created attachment 535146 [details]
Preprocessed source (-O2)

Comment 5 Jakub Jelinek 2012-02-29 17:14:19 UTC
Created attachment 566600 [details]
rh756138.ii

Slightly reduced testcase, for -O3 -funroll-loops -finline-limit=20000

Comment 6 Jakub Jelinek 2012-02-29 18:06:05 UTC
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154914
seems to fix this.

Comment 8 Jakub Jelinek 2012-03-02 18:30:35 UTC
In SVN: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184794

Comment 12 Marek Polacek 2012-05-27 13:09:33 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously GCC, when removing path in control flow graph, could accidentally cancel loops twice which resulted in internal compiler error.  This has been fixed so now the loops are cancelled once.

Comment 13 errata-xmlrpc 2012-06-20 14:39:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0941.html