From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7481 invoked by alias); 11 Jul 2005 12:33:22 -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 7443 invoked by alias); 11 Jul 2005 12:33:19 -0000 Date: Mon, 11 Jul 2005 12:57:00 -0000 Message-ID: <20050711123319.7442.qmail@sourceware.org> From: "dberlin at dberlin dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050702130552.22277.laurent@guerby.net> References: <20050702130552.22277.laurent@guerby.net> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug tree-optimization/22277] [4.1 Regression] ACATS ICE cc40001 in first_vi_for_offset, at tree-ssa-structalias.c:2566 X-Bugzilla-Reason: CC X-SW-Source: 2005-07/txt/msg01254.txt.bz2 List-Id: ------- Additional Comments From dberlin at gcc dot gnu dot org 2005-07-11 12:33 ------- Subject: Re: [4.1 Regression] ACATS ICE cc40001 in first_vi_for_offset, at tree-ssa-structalias.c:2566 On Mon, 2005-07-11 at 08:48 +0000, reichelt at gcc dot gnu dot org wrote: > ------- Additional Comments From reichelt at gcc dot gnu dot org 2005-07-11 08:48 ------- > More compact C++ testcase: > > ====================================== > struct A > { > char c; > int i; > }; > > A a; > > struct B > { > char c, d; > }; > > union C > { > A *p; > B *q; > > C() : p(&a) {} > char& foo() { return q->d; } > }; > > void bar() { C().foo() = 0; } Yes, that will work too. Note the part that bugs me severely is that you are accessing padding in A. :) This is true in the original testcase as well I'm not sure whether i should bother trying to do something sane in this case. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22277