From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28862 invoked by alias); 29 Aug 2005 13:54:25 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 28498 invoked by alias); 29 Aug 2005 13:54:21 -0000 Date: Mon, 29 Aug 2005 13:57:00 -0000 Message-ID: <20050829135421.28496.qmail@sourceware.org> From: "dberlin at dberlin dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050714141428.22488.micis@gmx.de> References: <20050714141428.22488.micis@gmx.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/22488] [4.1 Regression] ICE: in first_vi_for_offset, at tree-ssa-structalias.c:2585 with -O3 X-Bugzilla-Reason: CC X-SW-Source: 2005-08/txt/msg03312.txt.bz2 List-Id: ------- Additional Comments From dberlin at gcc dot gnu dot org 2005-08-29 13:54 ------- Subject: Re: [4.1 Regression] ICE: in first_vi_for_offset, at tree-ssa-structalias.c:2585 with -O3 On Mon, 2005-08-29 at 12:13 +0000, rguenth at gcc dot gnu dot org wrote: > ------- Additional Comments From rguenth at gcc dot gnu dot org 2005-08-29 12:13 ------- > Try > > Index: tree-ssa-structalias.c > =================================================================== > RCS file: /cvs/gcc/gcc/gcc/tree-ssa-structalias.c,v > retrieving revision 2.27 > diff -c -3 -p -r2.27 tree-ssa-structalias.c > *** tree-ssa-structalias.c 14 Aug 2005 19:23:56 -0000 2.27 > --- tree-ssa-structalias.c 29 Aug 2005 12:12:21 -0000 > *************** do_simple_structure_copy (const struct c > *** 2317,2322 **** > --- 2317,2324 ---- > q = get_varinfo (temprhs.var); > fieldoffset = p->offset - pstart; > q = first_vi_for_offset (q, q->offset + fieldoffset); > + if (!q) > + continue; > temprhs.var = q->id; > process_constraint (new_constraint (templhs, temprhs)); > } > > to workaround this. > This will generate bad code. This is one of the places where first_vi_for_offset should *never* fail. (it's not okay for it to fail during constraint generation. it's okay to fail during solving). As i noted in the bug, the real problem here seems to be the FE is generating overlaps when it shouldn't be (or it's using magic that we aren't to calculate the offsets, and hten is lying about it to the middle end :P) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22488