Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 5333
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: gollerjo@cis.uni-muenchen.de
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
test2.cpp test2.cpp application/octet-stream 2003-05-21 15:16 206 bytes Edit
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 5333 depends on: Show dependency tree
Show dependency graph
Bug 5333 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: Opened: 2002-01-09 04:36
GCC gives an ICE when trying to compile the attached .cpp file.
The exact error messsage is:

test.cpp: In instantiation of `B<char>':
test.cpp:29:   instantiated from here
test.cpp:16: Internal error: Speicherzugriffsfehler
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

Release:
gcc version 3.0.2 20010917 (prerelease)

Environment:
SuSE Linux 7.3 on a Pentium-III

How-To-Repeat:
g++ -o test test.cpp

------- Comment #1 From gollerjo@cis.uni-muenchen.de 2002-01-09 04:36 -------
Fix:
http://gcc.gnu.org/ml/gcc-patches/2003-02/msg02052.html

------- Comment #2 From Kriang Lerdsuwanakij 2002-05-19 04:37 -------
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed as a bug.  Present in both 3.1 branch and main
    trunk.  The code is illegal.  The declaration of '_a' inside
    'B' should be
      typename A<U,SubB1>::template SubA<SubB2> _a;
    Also, inside class 'SubB1', it cannot contain an instance of
    'B'.

------- Comment #3 From Wolfgang Bangerth 2003-01-22 14:12 -------
From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: c++/5333
Date: Wed, 22 Jan 2003 14:12:23 -0600 (CST)

 Still exists as of today in 3.2, 3.3, and 3.4 branches:
 
 g/a> /home/bangerth/bin/gcc-3.4-pre/bin/c++ test2.cpp
 test2.cpp: In instantiation of `A<U, B<U>::SubB1>':
 test2.cpp:24:   instantiated from here
 test2.cpp:11: error: `A<T1, T2>::_t1' has incomplete type
 test2.cpp:11: error: invalid use of template type parameter
 test2.cpp:6: internal compiler error: Speicherzugriffsfehler
 Please submit a full bug report,
 with preprocessed source if appropriate.
 See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
 
 -------------------------------------------------------------------------
 Wolfgang Bangerth             email:            bangerth@ticam.utexas.edu
                               www: http://www.ticam.utexas.edu/~bangerth/
 
 


------- Comment #4 From Mark Mitchell 2003-02-24 07:43 -------
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/5333
Date: 24 Feb 2003 07:43:23 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	mmitchel@gcc.gnu.org	2003-02-24 07:43:23
 
 Modified files:
 	gcc/cp         : ChangeLog cp-tree.h parser.c pt.c 
 	gcc/testsuite  : ChangeLog 
 	gcc/testsuite/g++.dg/parse: fused-params1.C 
 Added files:
 	gcc/testsuite/g++.dg/template: nested3.C 
 
 Log message:
 	PR c++/5333
 	* cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
 	* parser.c (cp_parser_diagnose_invalid_type_name): Use it.
 	* pt.c (instantiate_class_template): Don't try to instantiate
 	dependent types.
 	(resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
 	
 	PR c++/5333
 	* g++.dg/parse/fused-params1.C: Adjust error messages.
 	* g++.dg/template/nested3.C: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3211&r2=1.3212
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.813&r2=1.814
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.44&r2=1.45
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.662&r2=1.663
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2439&r2=1.2440
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/fused-params1.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/nested3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 


------- Comment #5 From Mark Mitchell 2003-02-24 07:43 -------
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/5333
Date: 24 Feb 2003 07:43:23 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	mmitchel@gcc.gnu.org	2003-02-24 07:43:23
 
 Modified files:
 	gcc/cp         : ChangeLog cp-tree.h parser.c pt.c 
 	gcc/testsuite  : ChangeLog 
 	gcc/testsuite/g++.dg/parse: fused-params1.C 
 Added files:
 	gcc/testsuite/g++.dg/template: nested3.C 
 
 Log message:
 	PR c++/5333
 	* cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
 	* parser.c (cp_parser_diagnose_invalid_type_name): Use it.
 	* pt.c (instantiate_class_template): Don't try to instantiate
 	dependent types.
 	(resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
 	
 	PR c++/5333
 	* g++.dg/parse/fused-params1.C: Adjust error messages.
 	* g++.dg/template/nested3.C: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3211&r2=1.3212
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.813&r2=1.814
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.44&r2=1.45
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.662&r2=1.663
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2439&r2=1.2440
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/fused-params1.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/nested3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 

------- Comment #6 From Mark Mitchell 2003-02-24 07:46 -------
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed in GCC 3.4, will not be fixed in GCC 3.2/3.3.  See:
    
    http://gcc.gnu.org/ml/gcc-patches/2003-02/msg02052.html

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug