Re: Bogus trees from Ada front-end (more VRP vs Ada) stuff)

2006-03-09 Thread Robert Dewar
Jeffrey A Law wrote: Presumably there's a reason why enumeral types don't have a base type? They don't in Ada (since there is no issue at the Ada semantic level of out of range intermediate values), but we could certainly introduce such a notion at the implementation level if it helps. I've

Re: Bogus trees from Ada front-end (more VRP vs Ada) stuff)

2006-03-08 Thread Jeffrey A Law
On Wed, 2006-03-08 at 12:36 +0100, Eric Botcazou wrote: > > Presumably there's a reason why enumeral types don't have a > > base type? > > They are viewed as full-blown types by Ada, forming the class of discrete > types with integral types, so there are probably no semantics reasons why > ENUME

Re: Bogus trees from Ada front-end (more VRP vs Ada) stuff)

2006-03-08 Thread Richard Kenner
They are viewed as full-blown types by Ada, forming the class of discrete types with integral types, so there are probably no semantics reasons why ENUMERAL_TYPE nodes should have an INTEGER_TYPE node as their base type. I'll add here that at one point I tried doing it the above way

Re: Bogus trees from Ada front-end (more VRP vs Ada) stuff)

2006-03-08 Thread Eric Botcazou
> Presumably there's a reason why enumeral types don't have a > base type? They are viewed as full-blown types by Ada, forming the class of discrete types with integral types, so there are probably no semantics reasons why ENUMERAL_TYPE nodes should have an INTEGER_TYPE node as their base type.

Re: Bogus trees from Ada front-end (more VRP vs Ada) stuff)

2006-03-07 Thread Jeffrey A Law
On Tue, 2006-03-07 at 08:00 -0500, Richard Kenner wrote: > if (INTEGRAL_TYPE_P (etype) && TREE_TYPE (etype)) > { > etype = TREE_TYPE (etype); > exp = fold_convert (etype, exp); > low = fold_convert (etype, low); > value = fold_convert (etype, value); >

Re: Bogus trees from Ada front-end (more VRP vs Ada) stuff)

2006-03-07 Thread Richard Kenner
if (INTEGRAL_TYPE_P (etype) && TREE_TYPE (etype)) { etype = TREE_TYPE (etype); exp = fold_convert (etype, exp); low = fold_convert (etype, low); value = fold_convert (etype, value); } I gather that we should restrict the transformat

Re: Bogus trees from Ada front-end (more VRP vs Ada) stuff)

2006-03-07 Thread Eric Botcazou
> This sounds like fold is merging the two comparisons above incorrectly into > the one upper comparison. Right. > It can do the merge, but it needs to convert to base types first. The type at stake is a ENUMERAL_TYPE and those have no base type constant invariant visited 8> unit size

Re: Bogus trees from Ada front-end (more VRP vs Ada) stuff)

2006-03-07 Thread Laurent GUERBY
On Mon, 2006-03-06 at 11:39 -0700, Jeffrey A Law wrote: > if Side = Right or else Side = Both then > while High >= Low and then Source (High) = Wide_Space loop > High := High - 1; > end loop; > end if; > > > side is an enumerated type with the following v

Re: Bogus trees from Ada front-end (more VRP vs Ada) stuff)

2006-03-06 Thread Richard Kenner
Here's the relevant bits from the .original dump if (side - 1 <= 1) Of particular interest is the (side - 1 <= 1) conditional which is implementing this hunk of code from the Trim function: if Side = Right or else Side = Both then I think it's time to hand this one to th

Re: Bogus trees from Ada front-end (more VRP vs Ada) stuff)

2006-03-06 Thread Andrew Pinski
On Mar 6, 2006, at 1:39 PM, Jeffrey A Law wrote: I think it's time to hand this one to the Ada guys :-0 I bet this is actually a fold issue rather than an Ada front-end issue. -- Pinski

Re: Bogus trees from Ada front-end (more VRP vs Ada) stuff)

2006-03-06 Thread Jeffrey A Law
On Mon, 2006-03-06 at 00:31 +0100, Eric Botcazou wrote: > > > cxa4025 and cxa4033 are very likely yours, originating in a miscompilation of > the runtime (a-stwifi.adb) at -O2. They succeed if the aforementioned unit > is compiled at -O2 -fno-tree-vrp. You can pass -a to gnatmake to cause the