From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28329 invoked by alias); 14 May 2005 14:09:47 -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 28279 invoked by uid 48); 14 May 2005 14:09:44 -0000 Date: Sat, 14 May 2005 14:09:00 -0000 From: "rguenth at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20050514140942.21568.rguenth@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug tree-optimization/21568] New: [3.4 regression] Casts in folding *& omitted X-Bugzilla-Reason: CC X-SW-Source: 2005-05/txt/msg01899.txt.bz2 List-Id: For the testcase int x; int foo(void) { x = 0; return *(volatile int *)&x; } the tree-optimizers omit the volatile cast and cprop 0 to the return statement which is invalid. This is a regression from 3.4 where we produced (with -O) foo: pushl %ebp movl %esp, %ebp movl $0, x movl x, %eax popl %ebp ret and now foo: pushl %ebp movl %esp, %ebp movl $0, x movl $0, %eax popl %ebp ret -- Summary: [3.4 regression] Casts in folding *& omitted Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rguenth at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21568