https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105461
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |needs-bisection Summary|ICE: Segmentation fault (in |[12/13 Regression] ICE: |verify_use) |Segmentation fault (in | |verify_use) Target Milestone|--- |12.0 CC| |marxin at gcc dot gnu.org --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- Hmm, we have <bb 2> : _6 = (float) y_3(D); *x_2(D) = _6; _7 = (int) _6; # DEBUG a => _7 return; but !MAY_HAVE_DEBUG_BIND_STMTS is true. It looks like a bug in option save/restore refactoring. In GCC 11 we disabled -fvar-tracking when -g is not enabled, diagnosing the mismatch but that's no longer done. Instead we now do /* Note -fvar-tracking is enabled automatically with OPT_LEVELS_1_PLUS and so we need to drop it if we are called from optimize attribute. */ if (debug_info_level == DINFO_LEVEL_NONE && !OPTION_SET_P (flag_var_tracking)) flag_var_tracking = false; while the code still present in toplev.cc does /* We know which debug output will be used so we can set flag_var_tracking and flag_var_tracking_uninit if the user has not specified them. */ if (debug_info_level < DINFO_LEVEL_NORMAL || !dwarf_debuginfo_p () || debug_hooks->var_location == do_nothing_debug_hooks.var_location) { if ((OPTION_SET_P (flag_var_tracking) && flag_var_tracking == 1) || (OPTION_SET_P (flag_var_tracking_uninit) && flag_var_tracking_uninit == 1)) { if (debug_info_level < DINFO_LEVEL_NORMAL) warning_at (UNKNOWN_LOCATION, 0, "variable tracking requested, but useless unless " "producing debug info"); else warning_at (UNKNOWN_LOCATION, 0, "variable tracking requested, but not supported " "by this debug format"); } flag_var_tracking = 0; flag_var_tracking_uninit = 0; flag_var_tracking_assignments = 0; that's inconsistent I guess (the toplev.c code doesn't alter the OPTIONS_SET set.