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
2d8f63a1
Commit
2d8f63a1
authored
May 11, 2011
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't crash ranging over call to builtin function.
From-SVN: r173671
parent
cfca3f72
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
gcc/go/gofrontend/expressions.cc
+5
-5
gcc/go/gofrontend/statements.cc
+2
-1
No files found.
gcc/go/gofrontend/expressions.cc
View file @
2d8f63a1
...
...
@@ -8527,9 +8527,9 @@ Call_expression::lower_varargs(Gogo* gogo, Named_object* function,
new_args
->
push_back
(
Expression
::
make_nil
(
loc
));
// We can't return a new call expression here, because this one may
// be referenced by Call_result expressions. FIXME.
if
(
old_args
!=
NULL
)
delete
old_args
;
// be referenced by Call_result expressions. FIXME.
We can't
// delete OLD_ARGS because we may have both a Call_expression and a
// Builtin_call_expression which refer to them. FIXME.
this
->
args_
=
new_args
;
this
->
varargs_are_lowered_
=
true
;
...
...
@@ -9250,8 +9250,8 @@ Index_expression::do_lower(Gogo*, Named_object*, int)
error_at
(
location
,
"invalid slice of map"
);
return
Expression
::
make_error
(
location
);
}
Map_index_expression
*
ret
=
Expression
::
make_map_index
(
left
,
start
,
location
);
Map_index_expression
*
ret
=
Expression
::
make_map_index
(
left
,
start
,
location
);
if
(
this
->
is_lvalue_
)
ret
->
set_is_lvalue
();
return
ret
;
...
...
gcc/go/gofrontend/statements.cc
View file @
2d8f63a1
...
...
@@ -4536,7 +4536,7 @@ For_range_statement::do_lower(Gogo* gogo, Named_object*, Block* enclosing)
else
{
this
->
report_error
(
_
(
"range clause must have "
"array, slice, s
e
tring, map, or channel type"
));
"array, slice, string, map, or channel type"
));
return
Statement
::
make_error_statement
(
this
->
location
());
}
...
...
@@ -4552,6 +4552,7 @@ For_range_statement::do_lower(Gogo* gogo, Named_object*, Block* enclosing)
{
range_temp
=
Statement
::
make_temporary
(
NULL
,
this
->
range_
,
loc
);
temp_block
->
add_statement
(
range_temp
);
this
->
range_
=
NULL
;
}
Temporary_statement
*
index_temp
=
Statement
::
make_temporary
(
index_type
,
...
...
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