On Sat, Jan 25, 2020 at 07:13:20PM -0500, Marek Polacek wrote:
> Here we crash when using -fsanitize=address -fdump-tree-sanopt because
> the dumping code uses IDENTIFIER_POINTER on a null DECL_NAME. Instead,
> we can print "<anonymous>" in such a case. Or we could avoid printing
> that diagnostic altogether.
>
> I don't think this warrants a testcase.
>
> Tested x86_64-linux, ok for trunk and 9?
Wouldn't it be better to:
if (dump_file)
{
fprintf (dump_file,
"Rewriting parameter whose address is taken: ");
print_generic_expr (dump_file, arg, dump_flags);
fputc ('\n', dump_file);
}
or so? That way, we can print D.1234 for those, but user has a way
to override it to D.xxxx etc.
> 2020-01-25 Marek Polacek <[email protected]>
>
> PR tree-optimization/93436
> * sanopt.c (sanitize_rewrite_addressable_params): Avoid crash on
> null DECL_NAME.
Jakub