On Sun, Jan 26, 2020 at 04:18:33PM -0500, Marek Polacek wrote:
> 2020-01-26 Marek Polacek <[email protected]>
>
> PR tree-optimization/93436
> * sanopt.c (sanitize_rewrite_addressable_params): Avoid crash on
> null DECL_NAME.
LGTM, thanks.
> ---
> gcc/sanopt.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/sanopt.c b/gcc/sanopt.c
> index 619aae45a15..0788eef597e 100644
> --- a/gcc/sanopt.c
> +++ b/gcc/sanopt.c
> @@ -1174,9 +1174,12 @@ sanitize_rewrite_addressable_params (function *fun)
> continue;
>
> if (dump_file)
> - fprintf (dump_file,
> - "Rewriting parameter whose address is taken: %s\n",
> - IDENTIFIER_POINTER (DECL_NAME (arg)));
> + {
> + fprintf (dump_file,
> + "Rewriting parameter whose address is taken: ");
> + print_generic_expr (dump_file, arg, dump_flags);
> + fputc ('\n', dump_file);
> + }
>
> SET_DECL_PT_UID (var, DECL_PT_UID (arg));
>
>
> base-commit: 9664b52aeb3db9ae35bba1766d677790c8a461ef
Jakub