aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJohn David Anglin <danglin@gcc.gnu.org>2020-01-30 07:26:58 -0500
committerJohn David Anglin <danglin@gcc.gnu.org>2020-01-30 07:26:58 -0500
commit64464e5f369231d2998608138da760274f256581 (patch)
tree70fd9469ff9715c6c1c0d057168e786bcc21a53c /gcc
parentefd26bbc81e94a324b3d3331a32eac089af8db1d (diff)
downloadgcc-64464e5f369231d2998608138da760274f256581.zip
gcc-64464e5f369231d2998608138da760274f256581.tar.gz
gcc-64464e5f369231d2998608138da760274f256581.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/pa/pa.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a141e06..00d200e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index fb7e2ee..24b8830 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);
}