First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 9216
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: o.kullmann@swansea.ac.uk
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

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

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: Opened: 2003-01-07 04:46
Error message:

> g++ Fehler.cpp
Fehler.cpp: In function `int main()':
Fehler.cpp:6: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

where Fehler.cpp is in How-to-Repeat.

Release:
gcc 3.2.1

Environment:
Linux (Suse 8.0)
> g++ -v
Reading specs from /compsci/partition1/csoliver/GCC/gcc-3.2.1/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/specs
Configured with: /compsci/partition1/csoliver/GCC/gcc-3.2.1/configure --enable-threads=posix --enable-long-lo
ng --prefix=/compsci/partition1/csoliver/GCC/gcc-3.2.1 --with-local-prefix=/compsci/partition1/csoliver/GCC/I
nclude_3.2.1 --enable-languages=c,c++ --disable-nls --enable-shared
Thread model: posix
gcc version 3.2.1

How-To-Repeat:
namespace N {
  template < typename T > class C : T {};
}

int main() {
 N::C();
}

------- Comment #1 From o.kullmann@swansea.ac.uk 2003-01-07 04:46 -------
Fix:
not known

------- Comment #2 From Volker Reichelt 2003-01-07 06:41 -------
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed.
    
    gcc 2.95.x and the 3.3 branch emit the following error messages:
    
    gcc 2.95.x: 
      bug.cc:6: invalid use of `template <class T> N::C<T>'
    gcc 3.3-20021230:
      bug.cc:6: error: invalid use of `template<class T> class N::C'
    
    With gcc 3.0.x, 3.1.x, 3.2.x we get an ICE which is clearly a regression
    on the 3.2 branch.
    
    With the new parser we get the following error message:
    
    bug.cc:6: error: expected primary-expression
    
    which is less descriptive than the error message in gcc 2.95.x, 3.3 branch.
    IMHO this is also a regression (although not a very severe one).

------- Comment #3 From Mark Mitchell 2003-01-23 06:05 -------
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/9216
Date: 23 Jan 2003 06:05:21 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	mmitchel@gcc.gnu.org	2003-01-23 06:05:21
 
 Modified files:
 	gcc/cp         : ChangeLog init.c parser.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/parse: new1.C template2.C typedef2.C 
 
 Log message:
 	PR c++/9354
 	* init.c (build_new): Set the type of the new-expression, even
 	when processing_templte_decl.
 	
 	PR c++/9216
 	* parser.c (cp_parser_primary_expression): Improve error message
 	for templates used in an expression context.
 	
 	PR c++/8696
 	* parser.c (cp_parser_decl_specifier_seq): Commit to tentative
 	parse when encountering "typedef".
 	
 	PR c++/9354
 	* g++.dg/parse/new1.C: New test.
 	
 	PR c++/9216
 	* g++.dg/parse/template2.C: New test.
 	
 	PR c++/9354
 	* g++.dg/parse/typedef2.C: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3174&r2=1.3175
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/init.c.diff?cvsroot=gcc&r1=1.306&r2=1.307
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.37&r2=1.38
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2363&r2=1.2364
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/new1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/template2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/typedef2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 


------- Comment #4 From Mark Mitchell 2003-01-23 06:05 -------
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/9216
Date: 23 Jan 2003 06:05:21 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	mmitchel@gcc.gnu.org	2003-01-23 06:05:21
 
 Modified files:
 	gcc/cp         : ChangeLog init.c parser.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/parse: new1.C template2.C typedef2.C 
 
 Log message:
 	PR c++/9354
 	* init.c (build_new): Set the type of the new-expression, even
 	when processing_templte_decl.
 	
 	PR c++/9216
 	* parser.c (cp_parser_primary_expression): Improve error message
 	for templates used in an expression context.
 	
 	PR c++/8696
 	* parser.c (cp_parser_decl_specifier_seq): Commit to tentative
 	parse when encountering "typedef".
 	
 	PR c++/9354
 	* g++.dg/parse/new1.C: New test.
 	
 	PR c++/9216
 	* g++.dg/parse/template2.C: New test.
 	
 	PR c++/9354
 	* g++.dg/parse/typedef2.C: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3174&r2=1.3175
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/init.c.diff?cvsroot=gcc&r1=1.306&r2=1.307
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.37&r2=1.38
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2363&r2=1.2364
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/new1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/template2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/typedef2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 

------- Comment #5 From Joe Buck 2003-04-25 21:01 -------
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed for 3.3.

First Last Prev Next    No search results available      Search page      Enter new bug