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
2e3d9575
Commit
2e3d9575
authored
14 years ago
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't store error types in the Type-to-GENERIC hash table.
From-SVN: r167838
parent
3db1a28c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
gcc/go/gofrontend/types.cc
+11
-0
No files found.
gcc/go/gofrontend/types.cc
View file @
2e3d9575
...
...
@@ -791,6 +791,9 @@ Type::get_tree(Gogo* gogo)
||
this
->
named_type
()
!=
NULL
)
return
this
->
get_tree_without_hash
(
gogo
);
if
(
this
->
is_error_type
())
return
error_mark_node
;
// To avoid confusing GIMPLE, we need to translate all identical Go
// types to the same GIMPLE type. We use a hash table to do that.
// There is no need to use the hash table for named types, as named
...
...
@@ -807,6 +810,14 @@ Type::get_tree(Gogo* gogo)
tree
t
=
this
->
get_tree_without_hash
(
gogo
);
// Don't store errors in the hash table. This type might be a
// pointer to an error type or something like that. Since error
// types are identical to everything else, that could cause us to
// return error_mark_node for pointers to any type, which will then
// confuse us later.
if
(
t
==
error_mark_node
)
return
error_mark_node
;
if
(
ins
.
first
->
second
==
NULL_TREE
)
ins
.
first
->
second
=
t
;
else
...
...
This diff is collapsed.
Click to expand it.
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