On 6/11/19 1:23 AM, Jakub Jelinek wrote:
> Hi!
>
> On the following testcase, we handle the case where both attributes
> are on the same decl (as varpool_node::alias isn't set yet), by setting the
> section even on the alias and then diagnosing if it is different from the
> target's section (would succeed with bar having baz section attribute).
> If the alias and section attributes are on different declarations of the
> same function, we ICE, as set_section asserts this->alias is not set,
> but during cp_finish_decl it is. My understanding is the problem the assert
> wants to avoid is when the varpool node is already analyzed, aliases are
> created and copied from the target to the aliases, but before that we can do
> what we do if all the attributes are on the same decl.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2019-06-11 Jakub Jelinek <ja...@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.
OK
jeff