On 05/26/2011 06:32 AM, Jakub Jelinek wrote:
gimplify_cond_expr knows how to gimplify this, but shortcut_cond_r tried to optimize if (a ? b : throw 1) goto yes; else goto no; into if (a) if (b) goto yes; else goto no; else if (throw 1) goto yes; else goto no; which ICEs or errors out. Fixed by not trying to optimize such COND_EXPRs.
Why not optimize them to if (!a) throw 1; if (b) goto yes; else goto no; ? Jason