+2016-08-23 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/77305
+ * statistics.c (statistics_counter_event): Robustify against
+ NULL current_pass.
+
2016-08-23 Venkataramanan Kumar
* config/i386/i386.c (processor_alias_table): Enable PTA_PRFCHW
|| incr == 0)
return;
- if (current_pass->static_pass_number != -1)
+ if (current_pass
+ && current_pass->static_pass_number != -1)
{
counter = lookup_or_add_counter (curr_statistics_hash (), id, 0, false);
gcc_assert (!counter->histogram_p);
fprintf (statistics_dump_file,
"%d %s \"%s\" \"%s\" %d\n",
- current_pass->static_pass_number,
- current_pass->name,
+ current_pass ? current_pass->static_pass_number : -1,
+ current_pass ? current_pass->name : "none",
id,
function_name (fn),
incr);