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:
> > 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
> Yes, I was thinking of NOP_EXPR.

Are you sure these are performed with NOP_EXPR rather than VIEW_CONVERT_EXPR.
I see this in convert() in ada/gcc-interface/utils.c:

  4095    /* If we are converting between two aggregate types that are mere
  4096       variants, just make a VIEW_CONVERT_EXPR.  */
  4097    else if (code == ecode
  4098             && AGGREGATE_TYPE_P (type)
  4099             && gnat_types_compatible_p (type, etype))
  4100      return build1 (VIEW_CONVERT_EXPR, type, expr);

I started up a bootstrap including Ada with an assert (!AGGREGATE_TYPE_P
(...)) in STRIP_NOPS.

Sorry for pushing this but I very much agree with Joseph that it would be an
improvement if we didn't have to check TYPE_MODE here.


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