From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23576 invoked by alias); 5 May 2006 18:06:58 -0000 Received: (qmail 23562 invoked by uid 22791); 5 May 2006 18:06:57 -0000 X-Spam-Check-By: sourceware.org Received: from ladle.dreamhost.com (HELO ladle.dreamhost.com) (205.196.219.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 05 May 2006 18:06:50 +0000 Received: from dhcp-172-29-77-40.corp.google.com (unknown [66.17.133.19]) by ladle.dreamhost.com (Postfix) with ESMTP id EDA52129A85; Fri, 5 May 2006 11:06:47 -0700 (PDT) Subject: Re: [Bug middle-end/27445] create_tmp_var_raw (gimplify.c) inadventently asserts 'volatile' on temps From: Daniel Berlin To: gcc-bugzilla@gcc.gnu.org Cc: gcc-bugs@gcc.gnu.org In-Reply-To: <20060505175510.18153.qmail@sourceware.org> References: <20060505175510.18153.qmail@sourceware.org> Content-Type: text/plain Date: Fri, 05 May 2006 18:06:00 -0000 Message-Id: <1146852347.22222.12.camel@dberlin0-corp.corp.google.com> Mime-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: 7bit 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-05/txt/msg00546.txt.bz2 List-Id: > I haven't looked into the rev. history, to see why/when this fix was made, > but will ask the hypothetical: was this fix made to workaround the > misbehavior in create_tmp_var_raw()? Note that create_tmp_var_raw() > is exported from gimplify.c and appears to be called from quite a few > places. The question arises: what are the preconditions for calling > create_tmp_var_raw()? If you want to assert that it uses whatever > type was passed in and all the callers have to remove qualifiers > as necessary that's fine, but requires some knowledge of the original > intent behind create_tmp_var_raw() and the assumptions its callers make. > I'd be temtpted to add an assert that the type passed in has no qualifiers > if that is a pre-condition. > Compiler temporaries we generate explicitly, have the same qualifiers as the expression they are generated from. This is by design.