Bug 7718 - 'complex' template instantiation causes internal compiler error (gcc 3.1, gcc 3.2)
Summary: 'complex' template instantiation causes internal compiler error (gcc 3.1, gcc...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.2
: P3 normal
Target Milestone: ---
Assignee: Nathan Sidwell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-25 15:56 UTC by hg211
Modified: 2003-07-25 17:33 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
t.cpp (232 bytes, application/octet-stream)
2003-05-21 15:16 UTC, hg211
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hg211 2002-08-25 15:56:00 UTC
If you give a template function as a parameter to a template class, and call this template function in a template class-function (it's hard to describe)
gcc 3.1.1 and gcc 3.2 stops with
't.cpp:19: Internal compiler error in tsubst_decl, at cp/pt.c:5648'

Try the attached simple cpp file.

If the default_initializer template function is a simple non-template function, then the sample compiles.

Release:
gcc version 3.2 20020809 (Debian prerelease)

Environment:
i386/Linux, AMD Athlon

How-To-Repeat:
compile the sample with 'g++ t.cpp -c'
Comment 1 Nathan Sidwell 2002-09-13 14:30:53 UTC
Responsible-Changed-From-To: unassigned->nathan
Responsible-Changed-Why: my tf_error patch broke it
Comment 2 Nathan Sidwell 2002-09-13 14:30:53 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: confirmed as a regression
Comment 3 Nathan Sidwell 2002-09-16 12:56:42 UTC
State-Changed-From-To: analyzed->closed
State-Changed-Why: 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
    
    	PR c++/7718
    	* pt.c (tsubst_decl): Remove assert.
Comment 4 Nathan Sidwell 2002-09-16 19:57:33 UTC
From: nathan@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/7718
Date: 16 Sep 2002 19:57:33 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	nathan@gcc.gnu.org	2002-09-16 12:57:33
 
 Modified files:
 	gcc/cp         : ChangeLog pt.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/template: subst1.C 
 
 Log message:
 	cp:
 	PR c++/7718
 	* pt.c (tsubst_decl): Remove assert.
 	testsuite:
 	* g++.dg/template/subst1.C: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.2962&r2=1.2963
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.615&r2=1.616
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2078&r2=1.2079
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/subst1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1