GCC Bugzilla – Bug 15299
[3.4/4.0 regression] ICE in resolve_overloaded_unification
Last modified: 2004-10-30 21:11:40 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.
Created attachment 6229 [details] Preprocessed C++ source allowing to reproduce the problem
Confirmed. Working on a reduced testcase.
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.
Very much related to bug 15285.
Working on a fix.
Subject: Bug 15299 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: mmitchel@gcc.gnu.org 2004-05-22 21:43:59 Modified files: gcc/testsuite : ChangeLog gcc/cp : ChangeLog pt.c 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/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.178&r2=1.3389.2.179 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.101&r2=1.3892.2.102 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.816.2.24&r2=1.816.2.25 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/non-dependent5.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/non-dependent6.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
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
Fixed in GCC 3.4.1.