Fix ICE in pa_elf_select_rtx_section.

2020-01-30  John David Anglin  <danglin@gcc.gnu.org>

	* config/pa/pa.c (pa_elf_select_rtx_section): Place function pointers
	without a DECL in .data.rel.ro.local.
This commit is contained in:
John David Anglin 2020-01-30 07:26:58 -05:00
parent efd26bbc81
commit 64464e5f36
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2020-01-30 John David Anglin <danglin@gcc.gnu.org>
* config/pa/pa.c (pa_elf_select_rtx_section): Place function pointers
without a DECL in .data.rel.ro.local.
2020-01-30 Jakub Jelinek <jakub@redhat.com>
PR target/93494

View File

@ -9852,7 +9852,7 @@ pa_elf_select_rtx_section (machine_mode mode, rtx x,
{
tree decl = SYMBOL_REF_DECL (x);
if (DECL_P (decl) && DECL_COMDAT_GROUP (decl))
if (!decl || (DECL_P (decl) && DECL_COMDAT_GROUP (decl)))
return get_named_section (NULL, ".data.rel.ro.local", 1);
}