diff options
author | David Edelsohn <dje.gcc@gmail.com> | 2020-07-10 17:06:21 -0400 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-17 13:17:20 -0300 |
commit | 3dea9c2995855ca107a5a2ce06dccbba25464768 (patch) | |
tree | 1f675016da4f41cb089c3a00c594e079cdcffc98 /gcc | |
parent | c8d19fbadbaf677d335635aeece1613daeeba882 (diff) | |
download | gcc-3dea9c2995855ca107a5a2ce06dccbba25464768.zip gcc-3dea9c2995855ca107a5a2ce06dccbba25464768.tar.gz gcc-3dea9c2995855ca107a5a2ce06dccbba25464768.tar.bz2 |
aix: only create named section for VAR_DECL or FUNCTION_DECL
get_constant_section() can be passed constant-like non-DECLs, such as
CONSTRUCTOR or STRING_CST, which make DECL_SECTION_NAME unhappy
(asserted in symtab_node::get). This patch ensures that xcoff select
section only invokes resolve_unique_section() for DECLs.
gcc/ChangeLog
2020-07-10 David Edelsohn <dje.gcc@gmail.com>
* config/rs6000/rs6000.c (rs6000_xcoff_select_section): Only
create named section for VAR_DECL or FUNCTION_DECL.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 15af9b2..b42f0c5 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -20465,7 +20465,7 @@ rs6000_xcoff_select_section (tree decl, int reloc, { /* Place variables with alignment stricter than BIGGEST_ALIGNMENT into named section. */ - if (align > BIGGEST_ALIGNMENT) + if (align > BIGGEST_ALIGNMENT && VAR_OR_FUNCTION_DECL_P (decl)) { resolve_unique_section (decl, reloc, true); if (IN_NAMED_SECTION (decl)) |