diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-08-29 17:01:54 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-08-29 17:01:54 +0200 |
commit | 7cb4d6483f37116c2d7d683eda077eecb1e51fd4 (patch) | |
tree | e9a76fb53aa6a7b6c53c8bee54347a403f4ab8b4 /gcc/symtab.c | |
parent | e25cfbd12ae1c9960cda5c38ee72375708c93e01 (diff) | |
download | gcc-7cb4d6483f37116c2d7d683eda077eecb1e51fd4.zip gcc-7cb4d6483f37116c2d7d683eda077eecb1e51fd4.tar.gz gcc-7cb4d6483f37116c2d7d683eda077eecb1e51fd4.tar.bz2 |
backport: re PR c/90760 (ICE on attributes section and alias in set_section, at symtab.c:1573)
Backported from mainline
2019-06-12 Jakub Jelinek <jakub@redhat.com>
PR c/90760
* symtab.c (symtab_node::set_section): Allow being called on aliases
as long as they aren't analyzed yet.
* gcc.dg/pr90760.c: New test.
From-SVN: r275041
Diffstat (limited to 'gcc/symtab.c')
-rw-r--r-- | gcc/symtab.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/symtab.c b/gcc/symtab.c index 67e14d7..2e1ca27b 100644 --- a/gcc/symtab.c +++ b/gcc/symtab.c @@ -1546,7 +1546,7 @@ symtab_node::set_section (symtab_node *n, void *s) void symtab_node::set_section (const char *section) { - gcc_assert (!this->alias); + gcc_assert (!this->alias || !this->analyzed); call_for_symbol_and_aliases (symtab_node::set_section, const_cast<char *>(section), true); } |