From 64464e5f369231d2998608138da760274f256581 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Thu, 30 Jan 2020 07:26:58 -0500 Subject: [PATCH] Fix ICE in pa_elf_select_rtx_section. 2020-01-30 John David Anglin * config/pa/pa.c (pa_elf_select_rtx_section): Place function pointers without a DECL in .data.rel.ro.local. --- gcc/ChangeLog | 5 +++++ gcc/config/pa/pa.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a141e0669f0..00d200ecf16 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2020-01-30 John David Anglin + + * 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 PR target/93494 diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index fb7e2ee110f..24b88304637 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -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); } -- 2.30.2