User account creation filtered due to spam.

Bug 15299 - [3.4/4.0 regression] ICE in resolve_overloaded_unification
Summary: [3.4/4.0 regression] ICE in resolve_overloaded_unification
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.4.0
: P2 critical
Target Milestone: 3.4.1
Assignee: Mark Mitchell
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2004-05-05 18:24 UTC by bagnara
Modified: 2004-10-30 21:11 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work: 3.3.4
Known to fail: 3.4.0 4.0.0
Last reconfirmed: 2004-05-05 18:57:46


Attachments
Preprocessed C++ source allowing to reproduce the problem (170.86 KB, application/x-bzip)
2004-05-05 18:25 UTC, bagnara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bagnara 2004-05-05 18:24:52 UTC
The attached source allows to reproduce the problem:

$ g++  -c sym2poly.ii
In file included from poly.h:26,
                 from sym2poly.h:23,
                 from sym2poly.cc:32:
monomial.h: In function `std::vector<giac::monomial<T>,
std::allocator<giac::monomial<T> > > giac::operator+(const
std::vector<giac::monomial<T>, std::allocator<giac::monomial<T> > >&, const
std::vector<giac::monomial<T>, std::allocator<giac::monomial<T> > >&)':
monomial.h:302: internal compiler error: in resolve_overloaded_unification, at
cp/pt.c:9227
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 bagnara 2004-05-05 18:25:52 UTC
Created attachment 6229 [details]
Preprocessed C++ source allowing to reproduce the problem
Comment 2 Wolfgang Bangerth 2004-05-05 18:38:07 UTC
Confirmed. Working on a reduced testcase. 
Comment 3 Wolfgang Bangerth 2004-05-05 18:57:46 UTC
This is probably the shortest possible: 
-------------- 
template <class T>  void fun_ptr(T (*)()); 
template <class T>  T    bar(); 
 
template <class> void foo () { 
  fun_ptr(bar<int>); 
} 
-------------- 
 
g/x> /home/bangerth/bin/gcc-3.3.4-pre/bin/c++ -c x.cc 
 
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc 
x.cc: In function `void foo()': 
x.cc:5: internal compiler error: in resolve_overloaded_unification, at cp/
pt.c:9228 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
 
g/x> /home/bangerth/bin/gcc-3.5-pre/bin/c++ -c x.cc 
x.cc: In function `void foo()': 
x.cc:5: internal compiler error: in resolve_overloaded_unification, at cp/
pt.c:9230 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
 
So it's a regression in 3.4/mainline. 
 
W. 
Comment 4 Andrew Pinski 2004-05-05 19:01:49 UTC
Very much related to bug 15285.
Comment 5 Mark Mitchell 2004-05-22 19:42:28 UTC
Working on a fix.
Comment 7 CVS Commits 2004-05-22 21:45:34 UTC
Subject: Bug 15299

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-05-22 21:45:25

Modified files:
	gcc/cp         : ChangeLog pt.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/template: non-dependent5.C non-dependent6.C 

Log message:
	PR c++/15285
	PR c++/15299
	* pt.c (build_non_dependent_expr): Expand the set of tree nodes
	recognized as overloaded functions.
	
	PR c++/15285
	PR c++/15299
	* g++.dg/template/non-dependent5.C: New test.
	* g++.dg/template/non-dependent6.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4051&r2=1.4052
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.851&r2=1.852
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3770&r2=1.3771
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/non-dependent5.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/non-dependent6.C.diff?cvsroot=gcc&r1=1.1&r2=1.2

Comment 8 Mark Mitchell 2004-05-22 21:47:32 UTC
Fixed in GCC 3.4.1.