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
0cc3d14e
Commit
0cc3d14e
authored
Dec 22, 2010
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for errors when building map construction.
From-SVN: r168148
parent
522c4f1f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
gcc/go/gofrontend/expressions.cc
+10
-2
No files found.
gcc/go/gofrontend/expressions.cc
View file @
0cc3d14e
...
...
@@ -11181,13 +11181,19 @@ Map_construction_expression::do_get_tree(Translate_context* context)
Type
*
key_type
=
mt
->
key_type
();
tree
id
=
get_identifier
(
"__key"
);
tree
key_field
=
build_decl
(
loc
,
FIELD_DECL
,
id
,
key_type
->
get_tree
(
gogo
));
tree
key_type_tree
=
key_type
->
get_tree
(
gogo
);
if
(
key_type_tree
==
error_mark_node
)
return
error_mark_node
;
tree
key_field
=
build_decl
(
loc
,
FIELD_DECL
,
id
,
key_type_tree
);
DECL_CONTEXT
(
key_field
)
=
struct_type
;
TYPE_FIELDS
(
struct_type
)
=
key_field
;
Type
*
val_type
=
mt
->
val_type
();
id
=
get_identifier
(
"__val"
);
tree
val_field
=
build_decl
(
loc
,
FIELD_DECL
,
id
,
val_type
->
get_tree
(
gogo
));
tree
val_type_tree
=
val_type
->
get_tree
(
gogo
);
if
(
val_type_tree
==
error_mark_node
)
return
error_mark_node
;
tree
val_field
=
build_decl
(
loc
,
FIELD_DECL
,
id
,
val_type_tree
);
DECL_CONTEXT
(
val_field
)
=
struct_type
;
DECL_CHAIN
(
key_field
)
=
val_field
;
...
...
@@ -11288,6 +11294,8 @@ Map_construction_expression::do_get_tree(Translate_context* context)
tree
descriptor
=
gogo
->
map_descriptor
(
mt
);
tree
type_tree
=
this
->
type_
->
get_tree
(
gogo
);
if
(
type_tree
==
error_mark_node
)
return
error_mark_node
;
static
tree
construct_map_fndecl
;
tree
call
=
Gogo
::
call_builtin
(
&
construct_map_fndecl
,
...
...
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