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
Created attachment 8384 [details] preprocessed source (3.4)
Created attachment 8385 [details] preprocessed source (4.0)
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>(); }
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
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.
Subject: Bug 20465 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-4_0-branch Changes by: nathan@gcc.gnu.org 2005-03-22 09:52:11 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&only_with_tag=gcc-4_0-branch&r1=1.4648.2.14&r2=1.4648.2.15 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.616.2.1&r2=1.616.2.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.58&r2=1.5084.2.59 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/ptrmem12.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1