From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3347 invoked by alias); 19 Jan 2006 00:14:31 -0000 Received: (qmail 3301 invoked by uid 48); 19 Jan 2006 00:14:28 -0000 Date: Thu, 19 Jan 2006 00:14:00 -0000 Message-ID: <20060119001428.3300.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug rtl-optimization/25654] [4.0/4.1/4.2 Regression] RTL alias analysis unprepared to handle stack slot sharing In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "hubicka 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-01/txt/msg01871.txt.bz2 List-Id: ------- Comment #10 from hubicka at gcc dot gnu dot org 2006-01-19 00:14 ------- My understanding of C type based aliasing rules always was that char, as an exception, might alias with everything. Perhaps I lived in false belief for a while, but at least -Wstrict-aliasing seems to think so: ibm:~ # more t.c char a[10]; short b[10]; main() { *(int *)a=5; *(int *)b=5; } ibm:~ # gcc -O2 -Wstrict-aliasing t.c t.c: In function main: t.c:6: warning: dereferencing type-punned pointer will break strict-aliasing rules -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25654