This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug middle-end/27445] 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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]