User account creation filtered due to spam.

Bug 9328 - [3.2/3.3/3.4 regression] ICE with templates and namespace std members
Summary: [3.2/3.3/3.4 regression] ICE with templates and namespace std members
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: unknown
: P3 normal
Target Milestone: 3.1.x/3.2.x
Assignee: Mark Mitchell
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2003-01-15 08:06 UTC by helmut.zeisel
Modified: 2004-07-17 01:26 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description helmut.zeisel 2003-01-15 08:06:01 UTC
test4.cxx:
====================================================
#include <cmath>
template<typename Fct, Fct fct>struct tWrapper{};
tWrapper<typeof(&std::sin),&std::sin> w;
====================================================

$ c++ test4.cxx
test4.cxx:3: Internal compiler error in walk_tree, at tree-inline.c:1315
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

Release:
unknown

Environment:
Cygwin, c++ (GCC) 3.2 20020927 (prerelease)
Linux, c++ (GCC) 3.2.1

How-To-Repeat:
See above code
Comment 1 helmut.zeisel 2003-01-15 08:06:01 UTC
Fix:
http://gcc.gnu.org/ml/gcc-patches/2003-01/msg01620.html
Comment 2 Wolfgang Bangerth 2003-01-15 08:30:19 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed. A regression w.r.t. 2.95 introduced first in
    3.0. Still present in 3.2.2pre, 3.3pre and 3.4 CVS
Comment 3 helmut.zeisel 2003-01-17 11:14:15 UTC
From: "Zeisel Helmut  VAI.ATI 3" <Helmut.Zeisel@vai.at>
To: <gcc-gnats@gcc.gnu.org>,
	<gcc-prs@gcc.gnu.org>,
	<helmut.zeisel@liwest.at>,
	<gcc-bugs@gcc.gnu.org>
Cc:  
Subject: Re: c++/9328: [3.2/3.3/3.4 regression] ICE with templates and namespace std members
Date: Fri, 17 Jan 2003 11:14:15 +0100

 In the meanwhile I found that this ICE has nothing to do with templates =
 and namespaces,
 but is a problem of typeof(X) when the type of X cannot be uniquely =
 derived.
 The same ICE occurs in the following code:
 
 double f(double);
 float f(float);
 void h(typeof(f) g) {}
 
 Helmut
 
 
 
 =20
Comment 4 Mark Mitchell 2003-01-22 22:32:17 UTC
Responsible-Changed-From-To: unassigned->mmitchel
Responsible-Changed-Why: Working on a fix.
Comment 5 Mark Mitchell 2003-01-23 00:17:32 UTC
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/9328
Date: 23 Jan 2003 00:17:32 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	mmitchel@gcc.gnu.org	2003-01-23 00:17:32
 
 Modified files:
 	gcc/cp         : ChangeLog error.c semantics.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/ext: typeof3.C 
 
 Log message:
 	PR c++/9328
 	* g++.dg/ext/typeof3.C: New test.
 	
 	PR c++/9328
 	* error.c (dump_decl): For an OVERLOAD, just print the name of the
 	function; it doesn't make sense to try to print its type.
 	* semantics.c (finish_typeof): Issue errors about invalid uses.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3172&r2=1.3173
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/error.c.diff?cvsroot=gcc&r1=1.196&r2=1.197
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.294&r2=1.295
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2362&r2=1.2363
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/typeof3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 

Comment 6 Mark Mitchell 2003-01-23 00:17:32 UTC
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/9328
Date: 23 Jan 2003 00:17:32 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	mmitchel@gcc.gnu.org	2003-01-23 00:17:32
 
 Modified files:
 	gcc/cp         : ChangeLog error.c semantics.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/ext: typeof3.C 
 
 Log message:
 	PR c++/9328
 	* g++.dg/ext/typeof3.C: New test.
 	
 	PR c++/9328
 	* error.c (dump_decl): For an OVERLOAD, just print the name of the
 	function; it doesn't make sense to try to print its type.
 	* semantics.c (finish_typeof): Issue errors about invalid uses.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3172&r2=1.3173
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/error.c.diff?cvsroot=gcc&r1=1.196&r2=1.197
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.294&r2=1.295
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2362&r2=1.2363
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/typeof3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 

Comment 7 Mark Mitchell 2003-01-23 00:21:53 UTC
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed in GCC 3.2, GCC 3.3, GCC 3.4.
Comment 8 Mark Mitchell 2003-01-23 00:30:29 UTC
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/9328
Date: 23 Jan 2003 00:30:29 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_2-branch
 Changes by:	mmitchel@gcc.gnu.org	2003-01-23 00:30:28
 
 Modified files:
 	gcc/cp         : ChangeLog error.c semantics.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/ext: typeof3.C 
 
 Log message:
 	PR c++/9328
 	* g++.dg/ext/typeof3.C: New test.
 	
 	PR c++/9328
 	* error.c (dump_decl): For an OVERLOAD, just print the name of the
 	function; it doesn't make sense to try to print its type.
 	* semantics.c (finish_typeof): Issue errors about invalid uses.
 
 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.58&r2=1.2685.2.114.2.59
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/error.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.170.2.3.2.3&r2=1.170.2.3.2.4
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.252.2.6.4.1&r2=1.252.2.6.4.2
 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.80&r2=1.1672.2.166.2.81
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/typeof3.C.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=NONE&r2=1.1.2.1
 

Comment 9 Mark Mitchell 2003-01-23 00:30:29 UTC
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/9328
Date: 23 Jan 2003 00:30:29 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_2-branch
 Changes by:	mmitchel@gcc.gnu.org	2003-01-23 00:30:28
 
 Modified files:
 	gcc/cp         : ChangeLog error.c semantics.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/ext: typeof3.C 
 
 Log message:
 	PR c++/9328
 	* g++.dg/ext/typeof3.C: New test.
 	
 	PR c++/9328
 	* error.c (dump_decl): For an OVERLOAD, just print the name of the
 	function; it doesn't make sense to try to print its type.
 	* semantics.c (finish_typeof): Issue errors about invalid uses.
 
 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.58&r2=1.2685.2.114.2.59
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/error.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.170.2.3.2.3&r2=1.170.2.3.2.4
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.252.2.6.4.1&r2=1.252.2.6.4.2
 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.80&r2=1.1672.2.166.2.81
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/typeof3.C.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=NONE&r2=1.1.2.1
 

Comment 10 Mark Mitchell 2003-01-23 00:31:55 UTC
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/9328
Date: 23 Jan 2003 00:31:55 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_3-branch
 Changes by:	mmitchel@gcc.gnu.org	2003-01-23 00:31:55
 
 Modified files:
 	gcc/cp         : ChangeLog error.c semantics.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/ext: typeof3.C 
 
 Log message:
 	PR c++/9328
 	* g++.dg/ext/typeof3.C: New test.
 	
 	PR c++/9328
 	* error.c (dump_decl): For an OVERLOAD, just print the name of the
 	function; it doesn't make sense to try to print its type.
 	* semantics.c (finish_typeof): Issue errors about invalid uses.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.3076.2.21&r2=1.3076.2.22
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/error.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.192&r2=1.192.2.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.282&r2=1.282.4.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.22&r2=1.2261.2.23
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/typeof3.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.4.1
 

Comment 11 Mark Mitchell 2003-01-23 00:31:55 UTC
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/9328
Date: 23 Jan 2003 00:31:55 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_3-branch
 Changes by:	mmitchel@gcc.gnu.org	2003-01-23 00:31:55
 
 Modified files:
 	gcc/cp         : ChangeLog error.c semantics.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/ext: typeof3.C 
 
 Log message:
 	PR c++/9328
 	* g++.dg/ext/typeof3.C: New test.
 	
 	PR c++/9328
 	* error.c (dump_decl): For an OVERLOAD, just print the name of the
 	function; it doesn't make sense to try to print its type.
 	* semantics.c (finish_typeof): Issue errors about invalid uses.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.3076.2.21&r2=1.3076.2.22
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/error.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.192&r2=1.192.2.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.282&r2=1.282.4.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.22&r2=1.2261.2.23
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/typeof3.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.4.1