This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Ada bootstrap failure due to loop optimization and builtin_stack_alloc
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: gcc at gcc dot gnu dot org
- Date: Wed, 28 Jul 04 22:21:52 EDT
- Subject: Ada bootstrap failure due to loop optimization and builtin_stack_alloc
I found out what's going on. I tried reproducing it in C, but failed.
It fails compiling the back_end.adb file in function Scan_Compiler_Arguments.
You can see the problem by looking at argv.103 between t46.loop and t48.lim.
Inside the loop, we have:
__builtin_stack_alloc (&argv, iftmp.293_316);
[ ... deleted ... ]
if (T.101_186) goto <L53>; else goto <L56>;
<L53>:;
argv.103_273 = (character[...] *)&argv;
The former actually *changes* what &argv returns. But the loop analyzer
doesn't know that and views the last statement above as a loop invariant and
moves it out of the loop. That's what's causing the SIGSEGV.