[PATCH] Update COND_EXPR section of c-tree.texi

Roger Sayle roger@eyesopen.com
Fri Oct 18 17:13:00 GMT 2002


I recently wrote:
> My conclusion was that this code following the barrier was the result
> of taking something innocent like "(i>=0? i : (abort(), 0))" and then
> using this in ptr[i*4], where more and more expressions are being
> folded across the "abort()", including SAVE_EXPRs etc...
>
> I'm not claiming that there isn't another bug somewhere in GCC's
> constant folding that effectively moves critical instructions after
> a noreturn function call, but fixing VOID_TYPE_P in COND_EXPRs has
> solved this issue.

Spooky, but one of the contributing factors to this problem may
have been discovered/fixed earlier today by Nathan Sidwell:
http://gcc.gnu.org/ml/gcc-patches/2002-10/msg01120.html

Nathan, this thread is about my patch to fold_binop_with_conditional
in http://gcc.gnu.org/ml/gcc-patches/2002-10/msg00873.html, which
appears to avoid a problem very similar to the one you describe.

Roger
--



More information about the Gcc-patches mailing list