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

> 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);

My concern is that conversions aren't only generated from there, but I may be 

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

Thanks, this will probably give the answer.

> 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.

I nevertheless think that you should guard the use of TYPE_PRECISION with the 
appropriate predicate, or else put the assert in the patch.

Eric Botcazou

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