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
7b8ec217
Commit
7b8ec217
authored
Feb 10, 2011
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't crash checking for unexported self-referential pointer field.
From-SVN: r170017
parent
a3fa23e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
gcc/go/gofrontend/types.cc
+14
-6
No files found.
gcc/go/gofrontend/types.cc
View file @
7b8ec217
...
...
@@ -8052,9 +8052,9 @@ Type::is_unexported_field_or_method(Gogo* gogo, const Type* type,
const
std
::
string
&
name
,
std
::
vector
<
const
Named_type
*>*
seen
)
{
type
=
type
->
deref
();
const
Named_type
*
nt
=
type
->
named_type
();
if
(
nt
==
NULL
)
nt
=
type
->
deref
()
->
named_type
();
if
(
nt
!=
NULL
)
{
if
(
nt
->
is_unexported_local_method
(
gogo
,
name
))
...
...
@@ -8072,6 +8072,8 @@ Type::is_unexported_field_or_method(Gogo* gogo, const Type* type,
}
}
type
=
type
->
deref
();
const
Interface_type
*
it
=
type
->
interface_type
();
if
(
it
!=
NULL
&&
it
->
is_unexported_method
(
gogo
,
name
))
return
true
;
...
...
@@ -8095,11 +8097,17 @@ Type::is_unexported_field_or_method(Gogo* gogo, const Type* type,
++
pf
)
{
if
(
pf
->
is_anonymous
()
&&
(
!
pf
->
type
()
->
deref
()
->
is_error_type
()
&&
!
pf
->
type
()
->
deref
()
->
is_undefined
()
))
&&
!
pf
->
type
()
->
deref
()
->
is_error_type
()
&&
!
pf
->
type
()
->
deref
()
->
is_undefined
(
))
{
Named_type
*
subtype
=
pf
->
type
()
->
deref
()
->
named_type
();
gcc_assert
(
subtype
!=
NULL
);
Named_type
*
subtype
=
pf
->
type
()
->
named_type
();
if
(
subtype
==
NULL
)
subtype
=
pf
->
type
()
->
deref
()
->
named_type
();
if
(
subtype
==
NULL
)
{
// This is an error, but it will be diagnosed elsewhere.
continue
;
}
if
(
Type
::
is_unexported_field_or_method
(
gogo
,
subtype
,
name
,
seen
))
{
if
(
nt
!=
NULL
)
...
...
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