This is the mail archive of the 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: [PATCH] Check precision rather than machine mode in STRIP_NOPS and STRIP_SIGN_NOPS

Eric Botcazou writes:
> > Based on verify_gimple_assign_unary we can only have conversion between
> > REFERENCE_TYPE here which I think can be removed as long as they have the
> > same precision.
> You can have conversions for basically everything, e.g between the const and 
> the non-const version of an aggregate type.

Do you mean here conversions that are processed by STRIP_NOPS?  STRIP_NOPS is
not used to process all conversions.  There are things that are converted with
other operators like FLOAT_EXPR, FIX_TRUNC_EXPR, VIEW_CONVERT_EXPR, etc.  This
code solely handles NOP_EXPR, CONVERT_EXPR and NON_LVALUE_EXPR.

And even if this type of conversion were used for your example, how would
keeping the check for TYPE_MODE change anything?  I am assuming that the same
machine mode and precision is used for an aggregate type regardless of its

Speaking of converting between const and non-const version of an aggregate
type, I guess I should really test this patch with Ada as well.


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