This is the mail archive of the gcc-patches@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: [PATCH] Improve PR30911 and PR31023, Ada and VRP


> How would you communicate this to the middle-end then?

My rough proposal is the following: we add a flag to a VAR_DECL that
means the value in it is invalid.  I think we also need a similar flag
on the other two ways of making a value: INDIRECT_REF and FUNCTION_CALL.
VRP propagates that flag the same way it propagates values with the fairly
obvious propagation rules.  If that flag is clear for an expression, VRP
uses the ranges from the subtype, otherwise from the type.

Then the Ada front-end is responsible for the initialization cases I spoke
about and for setting this flag in the few statically-determinable cases
where it needs to be set.


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