Bug 204394

Summary: gcc segmentation fault when typename preceeds specified template
Product: Red Hat Enterprise Linux 2.1 Reporter: Peter Tippett <peter.tippett>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-29 08:36:03 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:

Description Peter Tippett 2006-08-28 20:46:44 UTC
Description of problem:
When compiling code that uses the typename keyword against a template that 
hasn't been typedef'd (I'm actually not sure how best to describe it... but 
it's trivial to reproduce) then you get a segmentation fault.

Version-Release number of selected component (if applicable):
The version of Linux (uname -a) is actually:
Linux vanpglnx29 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 
i386 GNU/Linux
and the version of gcc (gcc --version) is:
gcc (GCC) 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)

How reproducible:
Every time.

Steps to Reproduce:
Compile the following cpp program using gcc (e.g. gcc test.cpp).
  
Actual results:
Segmentation fault.

Expected results:
No segmentation fault.

Additional info:
Try to compile this code:

#include <map>
using namespace std;

int main (int argv, char** argc) {
  map<int,int> mymap;
  mymap.insert(typename map<int,int>::value_type(1,1));
  return 0;
}

Comment 1 Jakub Jelinek 2006-08-29 08:36:03 UTC

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