Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 597380 - SR #2023672 gcc fails with an internal compiler error: in make_rtl_for_nonlocal_decl, at cp/decl.c:5067
SR #2023672 gcc fails with an internal compiler error: in make_rtl_for_nonloc...
Status: CLOSED DUPLICATE of bug 582682
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gcc (Show other bugs)
5.6
All Linux
high Severity high
: rc
: ---
Assigned To: Jakub Jelinek
qe-baseos-tools
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-28 15:22 EDT by Alan Matsuoka
Modified: 2011-05-13 08:54 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-28 15:52:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alan Matsuoka 2010-05-28 15:22:45 EDT
Base OS: RHEL-5.5
Any arch

Problem Description:

gcc fails with an ICE (internal compiler error) when compiling a particular c++ code:

internal compiler error: in make_rtl_for_nonlocal_decl, at cp/decl.c:5067

How Reproducible:

Always

Steps to reproduce:

Build the following program:

namespace
{
template <typename T>
class A
{
virtual T f1() { return c; }
static const T c = 0;
};
A<int> v;
}

g++ -c junk.cpp

Actual Results:

Compilation fails with the following error:

% gcc -c junk.cpp
junk.cpp: In instantiation of ‘const int <unnamed>::A<int>::c’:
junk.cpp:7:   instantiated from ‘T<unnamed>::A<T>::f1() [with T = int]’
junk.cpp:11:   instantiated from here
junk.cpp:8: internal compiler error: in make_rtl_for_nonlocal_decl, at cp/decl.c:5067
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/ccOodQtT.out file, please attach this to your bugreport.

Expected Result:

Compilation should finish successfully

Additional Information:

Upstream bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33094
Upstream  fix: http://gcc.gnu.org/viewcvs?view=revision&revision=128890

I have committed a minimal patch based on the above in a private branch 'private-SR2023672-branch' and created test packages for the customer. The customer has verified that the patch fixes the issue. Patch and test packages available here:

http://people.redhat.com/spoyarek/gcc-2023672/
Comment 1 Jakub Jelinek 2010-05-28 15:52:22 EDT

*** This bug has been marked as a duplicate of bug 582682 ***

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