Bug 43150

Summary: internal compiler error in lookup_template_class
Product: [Retired] Red Hat Linux Reporter: Need Real Name <daniel_collins>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-06-06 10:03:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
g++ -save-temps -v output
none
output from g++ -save-temps -v
none
output from g++ -save-temps -v
none
output from g++ -save-temps -v
none
real output from g++ -save-temps -v none

Description Need Real Name 2001-06-01 13:49:17 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)

Description of problem:
I am trying to compile a product of ours on Linux which uses a C++ library 
called objectspace.  This in turn offers its own versions of some of the 
STL classes and I am having problems compiling their version of map.  It 
works fine under egcs-1.1.2-30 and under Solaris (Workshop 5.0) and HP-UX 
(aCC).

How reproducible:
Always

Steps to Reproduce:
1. compile the test program
2.
3.
	

Actual Results:  I get the following: 

/home/dcollins/ccm_wa/evident/ip_mediation-
dcollins_lin/ip_mediation/objectspace/toolkit/ospace/osstd/rbtree.h: In 
instantiation of `os_rbtree<int, pair<const int, int>, 
os_stl_select1st<pair<const int, int>, int>, less<int> >':
/home/dcollins/ccm_wa/evident/ip_mediation-
dcollins_lin/ip_mediation/objectspace/toolkit/ospace/osstd/map.h:208:   
instantiated from `map<int, int, less<int> >'
test.cpp:5:   instantiated from here
/home/dcollins/ccm_wa/evident/ip_mediation-
dcollins_lin/ip_mediation/objectspace/toolkit/ospace/osstd/rbtree.h:890: 
Internal
compiler error in lookup_template_class, at ../gcc/cp/pt.c:4061


Expected Results:  It should compile.

Additional info:

I have used gcc-2.96-69, -81 (from RH7.1), -85 (from rawhide) and gcc-
2.95.3, all with the same results.

The program I am trying to compile is below, I will include the result of 
a g++ -save-temps -v when I can figure out how to add an attachment.

#include <ospace/std/map>

int main(void)
{
    map<int, int> test;

    return 0;
}

Comment 1 Need Real Name 2001-06-01 13:56:51 UTC
Created attachment 20085 [details]
output from g++ -save-temps -v

Comment 2 Need Real Name 2001-06-01 14:08:47 UTC
Sorry about the attachments, the temp.v one is just the -v output, which 
probably doesn't help you much.

I have got the .ii file from -save-temps but I can't seem to upload it. It 
might be too big, which was why I tried to gzip it but it may still be too big.
Since this is dependent on another product (the objectspace headers/library), I 
can't reduce the size of my "test case" any more.

Is there another way to get this file to you?


Comment 3 Jakub Jelinek 2001-06-06 10:03:36 UTC
Fixed with http://gcc.gnu.org/ml/gcc-patches/2000-11/msg01350.html in g++ 3.0,
I've just verified backport of this patch works and fixes it, so it will be fixed
for gcc-c++-2.96-86. FYI: this ICEs in gcc 2.95.2/2.95.3 as well.