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
eb83e2d7
Commit
eb83e2d7
authored
14 years ago
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't crash if tuple init redefines non-variable.
From-SVN: r168484
parent
1ed36e90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
6 deletions
+24
-6
gcc/go/gofrontend/parse.cc
+24
-6
No files found.
gcc/go/gofrontend/parse.cc
View file @
eb83e2d7
...
...
@@ -1655,9 +1655,15 @@ Parse::init_vars_from_map(const Typed_identifier_list* vars, Type* type,
if
(
!
this
->
gogo_
->
in_global_scope
())
this
->
gogo_
->
add_statement
(
s
);
else
if
(
!
val_no
->
is_sink
())
val_no
->
var_value
()
->
add_preinit_statement
(
s
);
{
if
(
val_no
->
is_variable
())
val_no
->
var_value
()
->
add_preinit_statement
(
s
);
}
else
if
(
!
no
->
is_sink
())
no
->
var_value
()
->
add_preinit_statement
(
s
);
{
if
(
no
->
is_variable
())
no
->
var_value
()
->
add_preinit_statement
(
s
);
}
else
{
// Execute the map index expression just so that we can fail if
...
...
@@ -1716,9 +1722,15 @@ Parse::init_vars_from_receive(const Typed_identifier_list* vars, Type* type,
if
(
!
this
->
gogo_
->
in_global_scope
())
this
->
gogo_
->
add_statement
(
s
);
else
if
(
!
val_no
->
is_sink
())
val_no
->
var_value
()
->
add_preinit_statement
(
s
);
{
if
(
val_no
->
is_variable
())
val_no
->
var_value
()
->
add_preinit_statement
(
s
);
}
else
if
(
!
no
->
is_sink
())
no
->
var_value
()
->
add_preinit_statement
(
s
);
{
if
(
no
->
is_variable
())
no
->
var_value
()
->
add_preinit_statement
(
s
);
}
else
{
Named_object
*
dummy
=
this
->
create_dummy_global
(
Type
::
lookup_bool_type
(),
...
...
@@ -1776,9 +1788,15 @@ Parse::init_vars_from_type_guard(const Typed_identifier_list* vars,
if
(
!
this
->
gogo_
->
in_global_scope
())
this
->
gogo_
->
add_statement
(
s
);
else
if
(
!
val_no
->
is_sink
())
val_no
->
var_value
()
->
add_preinit_statement
(
s
);
{
if
(
val_no
->
is_variable
())
val_no
->
var_value
()
->
add_preinit_statement
(
s
);
}
else
if
(
!
no
->
is_sink
())
no
->
var_value
()
->
add_preinit_statement
(
s
);
{
if
(
no
->
is_variable
())
no
->
var_value
()
->
add_preinit_statement
(
s
);
}
else
{
Named_object
*
dummy
=
this
->
create_dummy_global
(
type
,
NULL
,
location
);
...
...
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