Re: Tree CONSTRUCTORs and Ada array indices

2015-10-15 Thread Eric Botcazou
> C/C++ empty arrays (int a[0]) now use a signed TYPE_DOMAIN with bounds [0, > -1] for example (that was my original motivation to make hopefully all of > the middle-end > work with ssizetype TYPE_DOMAINs at least). The tree.c range-type build > helpers accept all integral types now (but most FEs

Re: Tree CONSTRUCTORs and Ada array indices

2015-10-15 Thread Richard Biener
On Wed, Oct 14, 2015 at 5:57 PM, Eric Botcazou wrote: >> I'm having fun with arrays in Ada ;) and wondering if anyone can tell me >> what's right here. > > No surprise, arrays are probably the base types for which there is the largest > gap between Ada and the C family of languages, for which GCC

Re: Tree CONSTRUCTORs and Ada array indices

2015-10-14 Thread Eric Botcazou
> I'm having fun with arrays in Ada ;) and wondering if anyone can tell me > what's right here. No surprise, arrays are probably the base types for which there is the largest gap between Ada and the C family of languages, for which GCC was written. You can see in the E_Array_Subtype case of gnat_

Re: Tree CONSTRUCTORs and Ada array indices

2015-10-14 Thread Richard Biener
On Wed, Oct 14, 2015 at 2:54 PM, Alan Lawrence wrote: > Hi, > > I'm having fun with arrays in Ada ;) and wondering if anyone can tell me > what's right here. > > Ada ACATS c64106a contains code with an array type whose indices run from -1 > to 1. (That is, three elements.) > > In GCC this gets rep

Tree CONSTRUCTORs and Ada array indices

2015-10-14 Thread Alan Lawrence
Hi, I'm having fun with arrays in Ada ;) and wondering if anyone can tell me what's right here. Ada ACATS c64106a contains code with an array type whose indices run from -1 to 1. (That is, three elements.) In GCC this gets represented as an ARRAY_TYPE, whose TYPE_DOMAIN is a 32-bit signed