From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3506 invoked by alias); 18 Aug 2006 21:15:58 -0000 Received: (qmail 3424 invoked by uid 48); 18 Aug 2006 21:15:51 -0000 Date: Fri, 18 Aug 2006 21:15:00 -0000 Message-ID: <20060818211551.3423.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/28778] strict-aliasing bug 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/msg01485.txt.bz2 List-Id: ------- Comment #3 from pinskia at gcc dot gnu dot org 2006-08-18 21:15 ------- Here is a full testcase: typedef long GLint; void aglChoosePixelFormat(const GLint *); void find(const int *alistp) { const int *blist; int list[32]; if (alistp) blist = alistp; else { list[3] = 42; blist = list; } aglChoosePixelFormat((GLint*)blist); } void aglChoosePixelFormat(const GLint *a) { int *b = (int*)a; if (b[3] != 42) __builtin_abort (); } int main(void) { find(0); return 0; } -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28778