Bug 597380 - SR #2023672 gcc fails with an internal compiler error: in make_rtl_for_nonlocal_decl, at cp/decl.c:5067
Summary: SR #2023672 gcc fails with an internal compiler error: in make_rtl_for_nonloc...
Keywords:
Status: CLOSED DUPLICATE of bug 582682
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gcc
Version: 5.6
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-28 19:22 UTC by Alan Matsuoka
Modified: 2011-05-13 12:54 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-28 19:52:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Alan Matsuoka 2010-05-28 19:22:45 UTC
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 19:52:22 UTC

*** 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.