This avoids a compiler crash on invalid code.
Fixes https://gcc.gnu.org/PR90272
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/174377
From-SVN: r270658
-b117b468264665cfe6ec2cf3affb48330a704fa7
+9476f6183791477dd9b883f51e2a46b224227735
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
p != this->methods_.end();
++p)
{
- if (!(*p)->func_value()->is_sink())
+ if ((*p)->is_function_declaration()
+ || !(*p)->func_value()->is_sink())
nt->add_existing_method(*p);
}
}