From: John David Anglin Date: Thu, 30 Jan 2020 12:29:35 +0000 (-0500) Subject: Fix ICE in pa_elf_select_rtx_section. X-Git-Tag: releases/gcc-9.3.0~169 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6957d3e4eef1f4243eb23ff62aea06139ef4415a;p=thirdparty%2Fgcc.git 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. --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 524dd981a6b5..8fc7b2a6e7cc 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 Kito Cheng Backport from mainline diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index a26169d689ef..3546846956ea 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -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); }