This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PR 23046. Folding predicates involving TYPE_MAX_VALUE/TYPE_MIN_VALUE (Ada RFC)
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: rasky at develer dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 12 Aug 05 12:19:58 EDT
- Subject: Re: PR 23046. Folding predicates involving TYPE_MAX_VALUE/TYPE_MIN_VALUE (Ada RFC)
Well, the point is that Gigi uses the fields TYPE_MIN/MAX_VALUE in a
way which is (now) incorrect,
No, that usage is correct. What's incorrect is the way that 'Valid and
range checks are being implemented and/or optimized. Those should not be
using the bounds of the subtype.
I'd also note that you already have SRA disabled, which is an
optimization which would be *very* useful to Ada, because of other
Gigi bugs.
No, SRA is disabled due to a very subtle front-end issue having to do
with renamed discriminants in cases where the resulting subtype has
fewer fields than the original record. The front end has to include the
"nonexistant" fields in the subtype for Gigi's use but in a way that
won't interfere with front-end semantics. This has been on the to-do list
for the front end folks for quite a while.