Bug 20817 - [4.0/4.1 Regression] ICE for tree check in build_offset_type
Summary: [4.0/4.1 Regression] ICE for tree check in build_offset_type
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.1.0
: P2 minor
Target Milestone: 4.0.2
Assignee: Nathan Sidwell
URL:
Keywords: error-recovery, ice-on-invalid-code, monitored
Depends on:
Blocks:
 
Reported: 2005-04-07 23:45 UTC by Janis Johnson
Modified: 2005-08-25 09:16 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-07-01 20:01:02


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janis Johnson 2005-04-07 23:45:44 UTC
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.
Comment 1 Andrew Pinski 2005-04-07 23:54:25 UTC
Confirmed.
Comment 2 Volker Reichelt 2005-04-11 19:14:38 UTC
It's a 4.0 regression, too.
Comment 3 Andrew Pinski 2005-07-01 20:01:02 UTC
I was passing with  "4.0.0 20041211".
Comment 4 GCC Commits 2005-08-25 09:06:56 UTC
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

Comment 5 Nathan Sidwell 2005-08-25 09:16:42 UTC
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
	->*.
Comment 6 GCC Commits 2005-08-25 09:17:20 UTC
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