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
10d53f5d
Commit
10d53f5d
authored
14 years ago
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't crash initializing multiple vars from a single result function.
From-SVN: r168482
parent
79b4a34a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
gcc/go/gofrontend/expressions.cc
+13
-3
No files found.
gcc/go/gofrontend/expressions.cc
View file @
10d53f5d
...
...
@@ -8898,10 +8898,16 @@ Call_result_expression::do_type()
// Call_expression::do_must_eval_in_order when there is an error.
Call_expression
*
ce
=
this
->
call_
->
call_expression
();
if
(
ce
==
NULL
)
return
Type
::
make_error_type
();
{
this
->
set_is_error
();
return
Type
::
make_error_type
();
}
Function_type
*
fntype
=
ce
->
get_function_type
();
if
(
fntype
==
NULL
)
return
Type
::
make_error_type
();
{
this
->
set_is_error
();
return
Type
::
make_error_type
();
}
const
Typed_identifier_list
*
results
=
fntype
->
results
();
if
(
results
==
NULL
)
{
...
...
@@ -8952,7 +8958,11 @@ Call_result_expression::do_get_tree(Translate_context* context)
tree
call_tree
=
this
->
call_
->
get_tree
(
context
);
if
(
call_tree
==
error_mark_node
)
return
error_mark_node
;
gcc_assert
(
TREE_CODE
(
TREE_TYPE
(
call_tree
))
==
RECORD_TYPE
);
if
(
TREE_CODE
(
TREE_TYPE
(
call_tree
))
!=
RECORD_TYPE
)
{
gcc_assert
(
saw_errors
());
return
error_mark_node
;
}
tree
field
=
TYPE_FIELDS
(
TREE_TYPE
(
call_tree
));
for
(
unsigned
int
i
=
0
;
i
<
this
->
index_
;
++
i
)
{
...
...
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