Bug 7478 - internal compiler error on static_cast inside template
Summary: internal compiler error on static_cast inside template
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.3
: P3 normal
Target Milestone: ---
Assignee: Mark Mitchell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-03 07:06 UTC by Stefaan De Roeck
Modified: 2003-07-25 17:33 UTC (History)
2 users (show)

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


Attachments
report (852 bytes, application/octet-stream)
2003-05-21 15:16 UTC, Stefaan De Roeck
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefaan De Roeck 2002-08-03 07:06:01 UTC
The three lines of code in the header of the attached report-file, trigger an internal compiler error.
For my purposes, I can replace static_cast with dynamic_cast, which does _not_ trigger the error.

Release:
gcc version 3.3 20020803 (all 3.x versions as far as i've seen)

How-To-Repeat:
compile the code I put in the report-file
Comment 1 Stefaan De Roeck 2002-08-03 07:06:01 UTC
Fix:
http://gcc.gnu.org/ml/gcc-patches/2002-10/msg01014.html
Comment 2 Gabriel Dos Reis 2002-08-03 08:44:59 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed. A regression from 2.95.x
Comment 3 Mark Mitchell 2002-10-16 12:57:37 UTC
Responsible-Changed-From-To: unassigned->mmitchel
Responsible-Changed-Why: Working on a fix.
Comment 4 Mark Mitchell 2002-10-16 17:24:05 UTC
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed in GCC 3.2.1.
Comment 5 Mark Mitchell 2002-10-17 00:15:39 UTC
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/7478
Date: 17 Oct 2002 00:15:39 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_2-branch
 Changes by:	mmitchel@gcc.gnu.org	2002-10-16 17:15:39
 
 Modified files:
 	gcc/cp         : ChangeLog cvt.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/template: ref1.C 
 
 Log message:
 	PR c++/7478
 	* cvt.c (convert_to_reference): Allow references as the incoming
 	type.
 	
 	PR c++/7478
 	* g++.dg/template/ref1.C: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.2685.2.114.2.22&r2=1.2685.2.114.2.23
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cvt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.112.2.4&r2=1.112.2.4.2.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.1672.2.166.2.30&r2=1.1672.2.166.2.31
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/ref1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=NONE&r2=1.1.2.1
 

Comment 6 Mark Mitchell 2002-10-17 00:15:39 UTC
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/7478
Date: 17 Oct 2002 00:15:39 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_2-branch
 Changes by:	mmitchel@gcc.gnu.org	2002-10-16 17:15:39
 
 Modified files:
 	gcc/cp         : ChangeLog cvt.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/template: ref1.C 
 
 Log message:
 	PR c++/7478
 	* cvt.c (convert_to_reference): Allow references as the incoming
 	type.
 	
 	PR c++/7478
 	* g++.dg/template/ref1.C: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.2685.2.114.2.22&r2=1.2685.2.114.2.23
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cvt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.112.2.4&r2=1.112.2.4.2.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.1672.2.166.2.30&r2=1.1672.2.166.2.31
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/ref1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=NONE&r2=1.1.2.1
 
Comment 7 Mark Mitchell 2002-10-17 00:17:59 UTC
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/7478
Date: 17 Oct 2002 00:17:59 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	mmitchel@gcc.gnu.org	2002-10-16 17:17:59
 
 Modified files:
 	gcc/cp         : ChangeLog cvt.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/template: ref1.C 
 
 Log message:
 	PR c++/7478
 	* cvt.c (convert_to_reference): Allow references as the incoming
 	type.
 	
 	PR c++/7478
 	* g++.dg/template/ref1.C: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3003&r2=1.3004
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cvt.c.diff?cvsroot=gcc&r1=1.124&r2=1.125
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2148&r2=1.2149
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/ref1.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
 

Comment 8 Mark Mitchell 2002-10-17 00:17:59 UTC
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/7478
Date: 17 Oct 2002 00:17:59 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	mmitchel@gcc.gnu.org	2002-10-16 17:17:59
 
 Modified files:
 	gcc/cp         : ChangeLog cvt.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/template: ref1.C 
 
 Log message:
 	PR c++/7478
 	* cvt.c (convert_to_reference): Allow references as the incoming
 	type.
 	
 	PR c++/7478
 	* g++.dg/template/ref1.C: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3003&r2=1.3004
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cvt.c.diff?cvsroot=gcc&r1=1.124&r2=1.125
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2148&r2=1.2149
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/ref1.C.diff?cvsroot=gcc&r1=1.1&r2=1.2