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
a2c76d48
Commit
a2c76d48
authored
Dec 16, 2010
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rework handling of recursive function types.
From-SVN: r167898
parent
7892de0c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
gcc/go/gofrontend/types.cc
+10
-4
No files found.
gcc/go/gofrontend/types.cc
View file @
a2c76d48
...
...
@@ -6887,11 +6887,17 @@ Named_type::do_get_tree(Gogo* gogo)
break
;
case
TYPE_FUNCTION
:
//
Don't recur infinitely if a function type refers to itself.
//
Ideally we would build a circular data structure here, bu
t
//
GENERIC can't handle them
.
//
GENERIC can't handle a pointer to a function type whose
//
return type is a pointer to the function type itself. I
t
//
does into infinite loops when walking the types
.
if
(
this
->
seen_
)
return
ptr_type_node
;
{
Function_type
*
fntype
=
this
->
type_
->
function_type
();
if
(
fntype
->
results
()
!=
NULL
&&
fntype
->
results
()
->
size
()
==
1
&&
fntype
->
results
()
->
front
().
type
()
->
forwarded
()
==
this
)
return
ptr_type_node
;
}
this
->
seen_
=
true
;
t
=
Type
::
get_named_type_tree
(
gogo
,
this
->
type_
);
this
->
seen_
=
false
;
...
...
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