Re: [PATCH] gimple: allow fold_stmt without setting cfun in case of GIMPLE_COND folding

2025-05-14 Thread Richard Biener
On Tue, May 13, 2025 at 10:42 PM Andrew Pinski wrote: > > This is the followup mentioned in > https://gcc.gnu.org/pipermail/gcc-patches/2025-May/683444.html . > It adds the check for cfun before accessing function specific flags. > We handle the case where !cfun as conservative in that it the fun

[PATCH] gimple: allow fold_stmt without setting cfun in case of GIMPLE_COND folding

2025-05-13 Thread Andrew Pinski
This is the followup mentioned in https://gcc.gnu.org/pipermail/gcc-patches/2025-May/683444.html . It adds the check for cfun before accessing function specific flags. We handle the case where !cfun as conservative in that it the function might throw. gcc/ChangeLog: * gimple-fold.cc (re