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
2887665c
Commit
2887665c
authored
Jan 27, 2011
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix self-referential struct via function and array.
From-SVN: r169339
parent
b5fa435a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
gcc/go/gofrontend/types.cc
+3
-2
No files found.
gcc/go/gofrontend/types.cc
View file @
2887665c
...
@@ -3763,7 +3763,7 @@ Struct_type::fill_in_tree(Gogo* gogo, tree type)
...
@@ -3763,7 +3763,7 @@ Struct_type::fill_in_tree(Gogo* gogo, tree type)
// Don't follow pointers yet, so that we don't get confused by a
// Don't follow pointers yet, so that we don't get confused by a
// pointer to an array of this struct type.
// pointer to an array of this struct type.
tree
field_type_tree
;
tree
field_type_tree
;
if
(
p
->
type
()
->
points_to
()
!=
NULL
)
if
(
p
->
type
()
->
points_to
()
!=
NULL
||
p
->
type
()
->
function_type
()
!=
NULL
)
{
{
field_type_tree
=
ptr_type_node
;
field_type_tree
=
ptr_type_node
;
has_pointer
=
true
;
has_pointer
=
true
;
...
@@ -3793,7 +3793,8 @@ Struct_type::fill_in_tree(Gogo* gogo, tree type)
...
@@ -3793,7 +3793,8 @@ Struct_type::fill_in_tree(Gogo* gogo, tree type)
p
!=
this
->
fields_
->
end
();
p
!=
this
->
fields_
->
end
();
++
p
,
field
=
DECL_CHAIN
(
field
))
++
p
,
field
=
DECL_CHAIN
(
field
))
{
{
if
(
p
->
type
()
->
points_to
()
!=
NULL
)
if
(
p
->
type
()
->
points_to
()
!=
NULL
||
p
->
type
()
->
function_type
()
!=
NULL
)
TREE_TYPE
(
field
)
=
p
->
type
()
->
get_tree
(
gogo
);
TREE_TYPE
(
field
)
=
p
->
type
()
->
get_tree
(
gogo
);
}
}
}
}
...
...
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