This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/27445] create_tmp_var_raw (gimplify.c) inadventently asserts 'volatile' on temps
- From: "dberlin at dberlin dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 May 2006 18:06:59 -0000
- Subject: [Bug middle-end/27445] create_tmp_var_raw (gimplify.c) inadventently asserts 'volatile' on temps
- References: <bug-27445-9975@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from dberlin at gcc dot gnu dot org 2006-05-05 18:06 -------
Subject: Re: create_tmp_var_raw (gimplify.c)
inadventently asserts 'volatile' on temps
> 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.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27445