Current GCC mainline ICEs, instead of reporting errors, for test g++.dg/old-deja/g++.benjamin/13908.C on powerpc-linux. The test isn't reported as failing because dg-error is used with a blank string. The ICE starts with the following patch, which might merely expose a latent bug: http://gcc.gnu.org/ml/gcc-cvs/2005-04/msg00325.html Test output: 13908.C: In function ‘void bar(chile*, void (chile::*)())’: 13908.C:20: error: parenthesis around ‘pobj->*pmethod’ cannot be used to form a pointer-to-member-function 13908.C:20: internal compiler error: tree check: expected class ‘type’, have ‘declaration’ (function_decl) in build_offset_type, at tree.c:4628 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Confirmed.
It's a 4.0 regression, too.
I was passing with "4.0.0 20041211".
Subject: Bug 20817 CVSROOT: /cvs/gcc Module name: gcc Changes by: nathan@gcc.gnu.org 2005-08-25 09:06:45 Modified files: gcc/cp : ChangeLog typeck.c gcc/testsuite : ChangeLog gcc/testsuite/g++.old-deja/g++.benjamin: 13908.C Log message: cp: PR c++/20817 * typeck.c (build_x_unary_op): Make sure OFFSET_REF is not for a ->*. testsuite: PR c++/20817 * g++.old-deja/g++.benjamin/13908.C: Robustify expected error. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4858&r2=1.4859 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&r1=1.647&r2=1.648 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5960&r2=1.5961 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.old-deja/g++.benjamin/13908.C.diff?cvsroot=gcc&r1=1.3&r2=1.4
fixed mainline and 4.0 2005-08-25 Nathan Sidwell <nathan@codesourcery.com> PR c++/20817 * typeck.c (build_x_unary_op): Make sure OFFSET_REF is not for a ->*.
Subject: Bug 20817 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-4_0-branch Changes by: nathan@gcc.gnu.org 2005-08-25 09:17:01 Modified files: gcc/cp : ChangeLog typeck.c gcc/testsuite : ChangeLog gcc/testsuite/g++.old-deja/g++.benjamin: 13908.C Log message: cp: PR c++/20817 * typeck.c (build_x_unary_op): Make sure OFFSET_REF is not for a ->*. testsuite: PR c++/20817 * g++.old-deja/g++.benjamin/13908.C: Robustify expected error. 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.82&r2=1.4648.2.83 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.13&r2=1.616.2.14 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.348&r2=1.5084.2.349 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.old-deja/g++.benjamin/13908.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.3&r2=1.3.76.1