https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108520
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|middle-end |tree-optimization Summary|[13 Regression] [C2x] ICE |[13 Regression] ICE in |in nonnull_arg_p, at |nonnull_arg_p, at |tree.cc:14372 with -O1 and |tree.cc:14372 with -O1 and |above (gnu::assume) |above (gnu::assume and | |gnu::nonnull) --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed, simplified C/C++ testcase: ``` static void f0() { } typedef void (*ft)(); struct st { ft f; }; #define array_s 3 [[ gnu::nonnull(1) ]] void f1(void *) { struct st af[array_s] = { { f0 } , { f0 } , { f0 } }; for (struct st *i = af, *e = af+array_s; i != e; i++) { [[ gnu::assume (i->f) ]]; i->f(); } } ``` get_range_global is assuming (bad pun) that it can call nonnull_arg_p even for non-current function parm_decls.