From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28388 invoked by alias); 29 Jul 2004 03:33:12 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 28381 invoked from network); 29 Jul 2004 03:33:11 -0000 Received: from unknown (HELO vlsi1.ultra.nyu.edu) (128.122.140.213) by sourceware.org with SMTP; 29 Jul 2004 03:33:11 -0000 Received: by vlsi1.ultra.nyu.edu (4.1/1.34) id AA06668; Wed, 28 Jul 04 23:35:24 EDT Date: Thu, 29 Jul 2004 17:12:00 -0000 From: kenner@vlsi1.ultra.nyu.edu (Richard Kenner) Message-Id: <10407290335.AA06668@vlsi1.ultra.nyu.edu> To: dnovillo@redhat.com Subject: Re: Patch to allow Ada to work with tree-ssa Cc: gcc-patches@gcc.gnu.org X-SW-Source: 2004-07/txt/msg02609.txt.bz2 Given a volatile variable 'x', '&x' is not marked TREE_CONSTANT, Why? That seems wrong. The address of a volatile variable is still constant. recompute_tree_invarant_for_addr_expr correctly knows that the address of a volatile decl is constant and invariant. Could you elaborate why exactly is_gimple_invariant is not sufficient here? I am about to revert this patch, unless you can give me a test case. Judging from the timing of the patch, the test case was the compiler itself since I hadn't started working on the ACATS yet. I'm not sure, but I believe the issue had to do with the fact that the stack isn't constant, only invariant, but I don't remember exactly what trouble that caused and where. We do need to get the case 'p = &x', so something will need to change here. I think the bug is that &x should be constant irrespective of the volatility of X.