Bug 20465 - [4.0/4.1 regression] error: no matching function for call
Summary: [4.0/4.1 regression] error: no matching function for call
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.0.0
: P2 critical
Target Milestone: 4.0.0
Assignee: Nathan Sidwell
URL:
Keywords: rejects-valid
Depends on: 20381
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-14 01:39 UTC by Matthias Klose
Modified: 2005-03-22 09:35 UTC (History)
5 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-03-17 13:35:00


Attachments
preprocessed source (3.4) (147.76 KB, application/x-gzip)
2005-03-14 01:40 UTC, Matthias Klose
Details
preprocessed source (4.0) (147.38 KB, application/x-gzip)
2005-03-14 01:41 UTC, Matthias Klose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Klose 2005-03-14 01:39:57 UTC
code from the openoffice-6980-m79 tree, compiled with current (20050312) gcc-3.4
CVS, doesn't compile with current gcc-4.0 CVS (plus patch proposed in PR20381,
without the patch, the same ICE as in PR20381 is seen).

$ g++-4.0 -c -O1 !$ g++-4.0 -c -O1 smilfunctionparser-4.0.ii
/home/doko/ooo/gcj/openoffice.org2-1.9.79.2/ooo-build/build/src680-m79/slideshow/source/engine/smilfunctionparser.cxx:
In constructor
‘presentation::internal::<unnamed>::ExpressionGrammar::definition<ScannerT>::definition(const
presentation::internal::<unnamed>::ExpressionGrammar&)’:
/home/doko/ooo/gcj/openoffice.org2-1.9.79.2/ooo-build/build/src680-m79/slideshow/source/engine/smilfunctionparser.cxx:484:
error: no matching function for call to ‘mem_fun_ref(double
(basegfx::B2DRange::*)()const)’
/home/doko/ooo/gcj/openoffice.org2-1.9.79.2/ooo-build/build/src680-m79/slideshow/source/engine/smilfunctionparser.cxx:485:
error: no matching function for call to ‘mem_fun_ref(double
(basegfx::B2DRange::*)()const)’
/home/doko/ooo/gcj/openoffice.org2-1.9.79.2/ooo-build/build/src680-m79/slideshow/source/engine/smilfunctionparser.cxx:486:
error: no matching function for call to ‘mem_fun_ref(double
(basegfx::B2DRange::*)()const)’
/home/doko/ooo/gcj/openoffice.org2-1.9.79.2/ooo-build/build/src680-m79/slideshow/source/engine/smilfunctionparser.cxx:487:
error: no matching function for call to ‘mem_fun_ref(double
(basegfx::B2DRange::*)()const)’


$ gcc-3.4 -O1 -c smilfunctionparser-3.4.ii
In file included from
/home/doko/ooo/gcj/openoffice.org2-1.9.79.2/ooo-build/build/src680-m79/solver/680/unxlngi4.pro/inc/com/sun/star/uno/RuntimeException.hdl:9,
                 from
/home/doko/ooo/gcj/openoffice.org2-1.9.79.2/ooo-build/build/src680-m79/solver/680/unxlngi4.pro/inc/com/sun/star/uno/RuntimeException.hpp:9,
                 from
/home/doko/ooo/gcj/openoffice.org2-1.9.79.2/ooo-build/build/src680-m79/solver/680/unxlngi4.pro/inc/canvas/debug.hxx:70,
                 from
/home/doko/ooo/gcj/openoffice.org2-1.9.79.2/ooo-build/build/src680-m79/slideshow/source/engine/smilfunctionparser.cxx:63:
/home/doko/ooo/gcj/openoffice.org2-1.9.79.2/ooo-build/build/src680-m79/solver/680/unxlngi4.pro/inc/com/sun/star/uno/Exception.hdl:36:
warning: `visibility' attribute does not apply to types
In file included from
/home/doko/ooo/gcj/openoffice.org2-1.9.79.2/ooo-build/build/src680-m79/solver/680/unxlngi4.pro/inc/com/sun/star/uno/RuntimeException.hpp:9,
                 from
/home/doko/ooo/gcj/openoffice.org2-1.9.79.2/ooo-build/build/src680-m79/solver/680/unxlngi4.pro/inc/canvas/debug.hxx:70,
                 from
/home/doko/ooo/gcj/openoffice.org2-1.9.79.2/ooo-build/build/src680-m79/slideshow/source/engine/smilfunctionparser.cxx:63:
/home/doko/ooo/gcj/openoffice.org2-1.9.79.2/ooo-build/build/src680-m79/solver/680/unxlngi4.pro/inc/com/sun/star/uno/RuntimeException.hdl:30:
warning: `visibility' attribute does not apply to types
In file included from
/home/doko/ooo/gcj/openoffice.org2-1.9.79.2/ooo-build/build/src680-m79/solver/680/unxlngi4.pro/inc/com/sun/star/lang/IllegalArgumentException.hpp:9,
                 from
/home/doko/ooo/gcj/openoffice.org2-1.9.79.2/ooo-build/build/src680-m79/solver/680/unxlngi4.pro/inc/canvas/debug.hxx:73,
                 from
/home/doko/ooo/gcj/openoffice.org2-1.9.79.2/ooo-build/build/src680-m79/slideshow/source/engine/smilfunctionparser.cxx:63:
/home/doko/ooo/gcj/openoffice.org2-1.9.79.2/ooo-build/build/src680-m79/solver/680/unxlngi4.pro/inc/com/sun/star/lang/IllegalArgumentException.hdl:34:
warning: `visibility' attribute does not apply to types
Comment 1 Matthias Klose 2005-03-14 01:40:47 UTC
Created attachment 8384 [details]
preprocessed source (3.4)
Comment 2 Matthias Klose 2005-03-14 01:41:14 UTC
Created attachment 8385 [details]
preprocessed source (4.0)
Comment 3 Andrew Pinski 2005-03-14 02:25:56 UTC
Reduced testcase:
template <class _Ret, class _Tp> void mem_fun_ref(_Ret (_Tp::*__f)());
struct A { double f(); };
template <class T> void f() { mem_fun_ref(&A::f); }
void g() { f<int>(); }
Comment 4 GCC Commits 2005-03-22 09:32:09 UTC
Subject: Bug 20465

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	nathan@gcc.gnu.org	2005-03-22 09:30:25

Modified files:
	gcc/cp         : ChangeLog typeck.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/template: ptrmem12.C 

Log message:
	cp:
	PR c++/20465
	PR c++/20381
	* typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
	template.
	testsuite:
	PR c++/20465
	PR c++/20381
	* g++.dg/template/ptrmem12.C: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4670&r2=1.4671
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&r1=1.619&r2=1.620
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5192&r2=1.5193
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/ptrmem12.C.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 5 Nathan Sidwell 2005-03-22 09:35:36 UTC
2005-03-22  Nathan Sidwell  <nathan@codesourcery.com>

	PR c++/20465
	PR c++/20381
	* typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
	template.