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
7d6c5039
Commit
7d6c5039
authored
Nov 08, 2013
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compiler: Correct types when type conversion makes backend call.
From-SVN: r204559
parent
26e3d0ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
gcc/go/gofrontend/expressions.cc
+5
-2
No files found.
gcc/go/gofrontend/expressions.cc
View file @
7d6c5039
...
...
@@ -3351,9 +3351,10 @@ Type_conversion_expression::do_get_tree(Translate_context* context)
return
se
->
get_tree
(
context
);
}
Call_e
xpression
*
i2s_expr
=
E
xpression
*
i2s_expr
=
Runtime
::
make_call
(
Runtime
::
INT_TO_STRING
,
this
->
location
(),
1
,
this
->
expr_
);
i2s_expr
=
Expression
::
make_cast
(
type
,
i2s_expr
,
this
->
location
());
ret
=
i2s_expr
->
get_tree
(
context
);
}
else
if
(
type
->
is_string_type
()
&&
expr_type
->
is_slice_type
())
...
...
@@ -3405,7 +3406,7 @@ Type_conversion_expression::do_get_tree(Translate_context* context)
Type
*
e
=
type
->
array_type
()
->
element_type
()
->
forwarded
();
go_assert
(
e
->
integer_type
()
!=
NULL
);
Call_e
xpression
*
s2a_expr
;
E
xpression
*
s2a_expr
;
if
(
e
->
integer_type
()
->
is_byte
())
s2a_expr
=
Runtime
::
make_call
(
Runtime
::
STRING_TO_BYTE_ARRAY
,
this
->
location
(),
1
,
this
->
expr_
);
...
...
@@ -3415,6 +3416,8 @@ Type_conversion_expression::do_get_tree(Translate_context* context)
s2a_expr
=
Runtime
::
make_call
(
Runtime
::
STRING_TO_INT_ARRAY
,
this
->
location
(),
1
,
this
->
expr_
);
}
s2a_expr
=
Expression
::
make_unsafe_cast
(
type
,
s2a_expr
,
this
->
location
());
ret
=
s2a_expr
->
get_tree
(
context
);
}
else
if
((
type
->
is_unsafe_pointer_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