https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66790

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu.org

--- Comment #10 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Just to mention that we have really thought hard about this bug at AdaCore and
the current patch seems (unfortunately) to be the only plausible way out, if we
don't want to pessimize the common case.  But suggestions are of course
welcome.

We have also discussed papering over it in the Ada front-end by initializing
the Out parameter to zero.  The problem is that you can write an equivalent Ada
testcase with an explicitly uninitialized variable and trigger the bug
(Pierre-Marie, could you attach it to the PR?  Concatenate the files though and
mention that it needs to be gnatchop'ed) so we cannot paper over it in all
cases.

But the fundamental thing to keep in mind here is that this is a valid Ada
program and that it could be translated into a valid C program: there is indeed
an uninitialized variable but the run-time behavior of the program doesn't
depend on its value.  The bug in REE effectively propagates the
uninitializedness of this variable to another, perfectly initialized variable,
because the latter initialization is done with a zero-extension that is
eliminated.

Reply via email to