Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
d9d8d4e5
Commit
d9d8d4e5
authored
Nov 24, 2014
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compiler: Do not dereference a named pointer type when looking up a method.
Fixes Issue 9018. From-SVN: r218026
parent
ea903c37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
gcc/go/gofrontend/types.cc
+12
-0
No files found.
gcc/go/gofrontend/types.cc
View file @
d9d8d4e5
...
...
@@ -10035,6 +10035,18 @@ Type::find_field_or_method(const Type* type,
if
(
found_level
==
0
)
return
false
;
else
if
(
found_is_method
&&
type
->
named_type
()
!=
NULL
&&
type
->
points_to
()
!=
NULL
)
{
// If this is a method inherited from a struct field in a named pointer
// type, it is invalid to automatically dereference the pointer to the
// struct to find this method.
if
(
level
!=
NULL
)
*
level
=
found_level
;
*
is_method
=
true
;
return
false
;
}
else
if
(
!
found_ambig1
.
empty
())
{
go_assert
(
!
found_ambig1
.
empty
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment