sanopt: Avoid crash on anonymous parameter [PR93436]
authorMarek Polacek <polacek@redhat.com>
Sun, 26 Jan 2020 00:02:11 +0000 (19:02 -0500)
committerMarek Polacek <polacek@redhat.com>
Sun, 26 Jan 2020 21:28:10 +0000 (16:28 -0500)
commitab6cd364eda21d3d24a4df0072c588cc68ff61e0
treeab08fa95625145dba6e879f6cc3180f3cae833b0
parent8022264265dd39887a1723eeda8ae445afad1fde
sanopt: Avoid crash on anonymous parameter [PR93436]

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.

2020-01-26  Marek Polacek  <polacek@redhat.com>

PR tree-optimization/93436
* sanopt.c (sanitize_rewrite_addressable_params): Avoid crash on
null DECL_NAME.
gcc/ChangeLog
gcc/sanopt.c