This is the mail archive of the
mailing list for the GCC project.
Re: Ada bootstrap failure due to loop optimization and builtin_stack_alloc
> > > this sounds weird.
> > >
> > > It's a wierd builtin!
> > >
> > > What are the virtual operands on __builtin_stack_alloc and the
> > > assignment statements?
> > >
> > > There are none on the assignment.
> > hmm.... right. The problem is that &argv behaves in a really weird way --
> > it really refers to memory, unlike any other occurence of &.
> Then it is broken. In GIMPLE ADDR_EXPR is never a reference to memory.
unfortunately this is not quite true at the moment. An array x that is
allocated via stack_alloc builtin is actually used in two meanings:
1) As x[whatever], it corresponds to the contents of the array x.
2) As &x, it corresponds to the address of the array x, which is also
variable (since single builtin_stack_alloc may be run several times
and assign different addresses to it).
While we correctly maintain virtual operands for 1), we do not do it
for 2), which causes the Ada bootstrap problem.
In the mail you responded to I have outlined two possible approaches to
fixing this; I have both basically done, so I am just waiting on what
will people consider better (or whether someone will not have a better
idea how to solve the problem).