This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Ada bootstrap failure due to loop optimization and builtin_stack_alloc
Hello,
> Send me the code again?
>
> > 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).
> >
> Perhaps #1. But I think neither, the address of that variable is not
> invariant, so it shouldn't be lifted out of the loop. But I lost track
> of the original test case, so I'm not convinced I'm making any sense.
the loop looks like
while (...)
{
builtin_stack_alloc (&array, size);
arraystart_1 = &array;
use (*arraystart_1);
}
Since there is no USE nor VUSE operand on the arraystart_1 = &array;
statement, loop invariant motion decides that it is invariant inside the
loop and moves it out, which is wrong.
Zdenek