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
fa9fe7a5
Commit
fa9fe7a5
authored
Feb 01, 2012
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compiler: Don't crash on switch _ := v.(type).
From-SVN: r183814
parent
cf82db16
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
gcc/go/gofrontend/parse.cc
+10
-3
No files found.
gcc/go/gofrontend/parse.cc
View file @
fa9fe7a5
...
...
@@ -4311,9 +4311,16 @@ Parse::type_switch_body(Label* label, const Type_switch& type_switch,
Named_object
*
switch_no
=
NULL
;
if
(
!
type_switch
.
name
.
empty
())
{
Variable
*
switch_var
=
new
Variable
(
NULL
,
type_switch
.
expr
,
false
,
false
,
false
,
type_switch
.
location
);
switch_no
=
this
->
gogo_
->
add_variable
(
type_switch
.
name
,
switch_var
);
if
(
Gogo
::
is_sink_name
(
type_switch
.
name
))
error_at
(
type_switch
.
location
,
"no new variables on left side of %<:=%>"
);
else
{
Variable
*
switch_var
=
new
Variable
(
NULL
,
type_switch
.
expr
,
false
,
false
,
false
,
type_switch
.
location
);
switch_no
=
this
->
gogo_
->
add_variable
(
type_switch
.
name
,
switch_var
);
}
}
Type_switch_statement
*
statement
=
...
...
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