From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16458 invoked by alias); 23 Aug 2006 08:06:43 -0000 Received: (qmail 16305 invoked by uid 48); 23 Aug 2006 08:06:34 -0000 Date: Wed, 23 Aug 2006 08:06:00 -0000 Message-ID: <20060823080634.16304.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/28807] [4.2 Regression] wrong code with may_alias and structs In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gcc dot gnu dot org" 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 X-SW-Source: 2006-08/txt/msg01922.txt.bz2 List-Id: ------- Comment #5 from pinskia at gcc dot gnu dot org 2006-08-23 08:06 ------- (In reply to comment #4) > This is a hard nut to crack, my *guess* is that if you just check the > alias set of the type of the access, we are going to end up claiming any > access to a structure containing a char variable is aliased. You are correct as we regress with the following testcase: struct a { char a1; }; int *aa; void g(int *a) { aa = a; *a = 2; } int t(int i, struct a *b) { g(&i); b->a1 = 1; i = 2; if (b->a1 != 1) link_failure (); } int main(void) { struct a b; t(1, &b); return 0; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28807