Bug 190039 - C++ crash on seemingly innocous code.
C++ crash on seemingly innocous code.
Product: Fedora
Classification: Fedora
Component: gcc4 (Show other bugs)
All Linux
medium Severity urgent
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2006-04-26 17:33 EDT by Marcus Brubaker
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-04-27 04:50:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Preprocessor output from GCC (63.77 KB, text/plain)
2006-04-26 17:33 EDT, Marcus Brubaker
no flags Details
Test case (6.41 KB, text/plain)
2006-04-26 17:36 EDT, Marcus Brubaker
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
GNU Compiler Collection 27335 None None None Never

  None (edit)
Description Marcus Brubaker 2006-04-26 17:33:08 EDT
Description of problem:
GCC chokes on some C++ code.

Version-Release number of selected component (if applicable):

How reproducible:
Every time.

Steps to reproduce:
Compile attached source with the following command:
        g++ -c nmtest.cpp -funroll-loops -O2 -o nmtest.o

Actual results:
Crash with the following output:
nmtest.cpp: In function ‘int main()’:
nmtest.cpp:293: internal compiler error: in get_loop_body, at cfgloop.c:799
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccGuOWMs.out file, please attach this to
your bugreport.

Expected results:
Compiled code.

Additional info:
This is using ccache but I don't expect that it has anything to do with this.  I
have wiped the cache and rebuilt from scratch with the same results.

I will attach some code in a follow up comment.  The preprocessor output is
attached here.
Comment 1 Marcus Brubaker 2006-04-26 17:33:08 EDT
Created attachment 128274 [details]
Preprocessor output from GCC
Comment 2 Marcus Brubaker 2006-04-26 17:36:41 EDT
Created attachment 128275 [details]
Test case
Comment 3 Marcus Brubaker 2006-04-26 17:38:30 EDT
The bug only triggers with combination of -funroll-loops and -O2.  Use only one
flag or the other on its own and the code compiles fine.
Comment 4 Jakub Jelinek 2006-04-27 04:50:20 EDT
Tracking upstream.

Note You need to log in before you can comment on or make changes to this bug.