From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29512 invoked by alias); 13 Aug 2004 19:50:31 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 29448 invoked from network); 13 Aug 2004 19:50:30 -0000 Received: from unknown (HELO vlsi1.ultra.nyu.edu) (128.122.140.213) by sourceware.org with SMTP; 13 Aug 2004 19:50:30 -0000 Received: by vlsi1.ultra.nyu.edu (4.1/1.34) id AA16722; Fri, 13 Aug 04 15:53:02 EDT Date: Fri, 13 Aug 2004 19:59:00 -0000 From: kenner@vlsi1.ultra.nyu.edu (Richard Kenner) Message-Id: <10408131953.AA16722@vlsi1.ultra.nyu.edu> To: gcc@gcc.gnu.org Subject: Question on cfg_remove_useless_stmts_bb X-SW-Source: 2004-08/txt/msg00573.txt.bz2 I'm getting a failure on c-torture/execute/930513-2.c with -O3 and what's happening is that the out of ssa pass is looking at if (j != i) goto ; else goto ; ... :; i = i + 1; j = i; The cfg_remove_useless_stmts_bb knows that J and I are equal. So when it gets to the "j = i" assignment, it deletes it. The problem is that it doesn't notice that "i = i + 1" clobbers the equality relation. I don't think it's sufficient to test for an assignment to VAL here because I think VAL can be an expression since we are no longer in GIMPLE, but I'm not sure. Hence my question. I don't know why this test isn't failing for everybody, so I suspect this is some sort of latent bug somehow. (Or else I'm missing something, which is quite possible.)