Bug 22404 - [4.1 regression] ICE in first_vi_for_offset
Summary: [4.1 regression] ICE in first_vi_for_offset
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: 4.1.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code, monitored
Depends on: 19816
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-11 09:03 UTC by Volker Reichelt
Modified: 2005-07-11 23:10 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-07-11 16:35:32


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2005-07-11 09:03:07 UTC
Yet another ICE in first_vi_for_offset. Compile the following code snippet
with "g++ -O":

=========================
struct A { A(); };

struct B : A
{
    A a;
};

struct C : B { };

C c;
=========================

bug.cc: In function 'void __static_initialization_and_destruction_0(int, int)':
bug.cc:10: internal compiler error: in first_vi_for_offset, at
tree-ssa-structalias.c:2829
Please submit a full bug report, [etc.]

Probably different from PR22277, since I can trigger PR22277 with a 20050709
snapshot, but not the one above (which I can trigger since 20050710).

Actually the problem seems to be related to PR22071.
Comment 1 Andrew Pinski 2005-07-11 16:35:32 UTC
Confirmed.  I think fixing PR 19816 will also fix this.
Comment 2 GCC Commits 2005-07-11 18:28:49 UTC
Subject: Bug 22404

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	dberlin@gcc.gnu.org	2005-07-11 18:28:36

Modified files:
	gcc            : ChangeLog print-tree.c tree-ssa-structalias.c 
	                 tree.h 
Added files:
	gcc/testsuite/g++.dg/tree-ssa: pr22404.C 

Log message:
	2005-07-11  Daniel Berlin  <dberlin@dberlin.org>
	
	* print-tree.c (print_node): Use DECL_ARGUMENT_FLD.
	* tree.h (DECL_ARGUMENT_FLD): New macro.
	
	2005-07-11  Daniel Berlin  <dberlin@dberlin.org>
	
	Fix PR tree-optimization/22404
	
	* tree-ssa-structalias.c (create_variable_info_for): Use
	correct offset.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9408&r2=2.9409
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/print-tree.c.diff?cvsroot=gcc&r1=1.103&r2=1.104
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-structalias.c.diff?cvsroot=gcc&r1=2.16&r2=2.17
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.h.diff?cvsroot=gcc&r1=1.745&r2=1.746
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/tree-ssa/pr22404.C.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 3 Andrew Pinski 2005-07-11 23:10:36 UTC
Fixed.