mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-08 10:50:47 +08:00
compiler: avoid crash on real declaration of type with existing method
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
This commit is contained in:
parent
1978e62d47
commit
65937ccf0b
@ -1,4 +1,4 @@
|
||||
b117b468264665cfe6ec2cf3affb48330a704fa7
|
||||
9476f6183791477dd9b883f51e2a46b224227735
|
||||
|
||||
The first line of this file holds the git revision number of the last
|
||||
merge done from the gofrontend repository.
|
||||
|
@ -7816,7 +7816,8 @@ Type_declaration::define_methods(Named_type* nt)
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user