From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27371 invoked by alias); 9 Oct 2005 09:56:12 -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 27364 invoked by uid 48); 9 Oct 2005 09:56:11 -0000 Date: Sun, 09 Oct 2005 09:56:00 -0000 Message-ID: <20051009095611.27363.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/19637] Missed VRP and FRE opportunities in the presence of casts In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" X-SW-Source: 2005-10/txt/msg01069.txt.bz2 List-Id: ------- Comment #8 from rguenth at gcc dot gnu dot org 2005-10-09 09:56 ------- Another one is the following (without any possible aliasing problems): int foo_charchar(void) { char i[2*sizeof(int)]; new (i) Foo(); return reinterpret_cast(&i[0])->i[0]; } where we miss the FRE opportunity for the cast: : iftmp.0 = (struct Foo *) &i[0]; iftmp.0->i[0] = 1; D.2097 = (struct Foo *) &i[0]; return D.2097->i[0]; -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Missed constant propagation |Missed VRP and FRE |with placement new |opportunities in the | |presence of casts http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19637