]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix ICE in pa_elf_select_rtx_section.
authorJohn David Anglin <danglin@gcc.gnu.org>
Thu, 30 Jan 2020 12:29:35 +0000 (07:29 -0500)
committerJohn David Anglin <danglin@gcc.gnu.org>
Thu, 30 Jan 2020 12:29:35 +0000 (07:29 -0500)
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.

gcc/ChangeLog
gcc/config/pa/pa.c

index 524dd981a6b5ca96937e67ca9a6848a918c8a7f8..8fc7b2a6e7cc490f2b5bda3f7b13ae8372678120 100644 (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  Kito Cheng  <kito.cheng@sifive.com>
 
        Backport from mainline
index a26169d689ef16212139ea46a65a3ac2c41b20f5..3546846956eaecd2bab006050139d38c92eeb5e9 100644 (file)
@@ -9861,7 +9861,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);
     }