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
5003ddad
Commit
5003ddad
authored
May 05, 2015
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compiler: Don't make temporaries for constant string concatentation.
Fixes golang/go#10642. From-SVN: r222828
parent
21c0a521
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
gcc/go/gofrontend/expressions.cc
+4
-2
No files found.
gcc/go/gofrontend/expressions.cc
View file @
5003ddad
...
...
@@ -5120,13 +5120,15 @@ Binary_expression::do_flatten(Gogo* gogo, Named_object*,
if
(
this
->
left_
->
type
()
->
is_string_type
()
&&
this
->
op_
==
OPERATOR_PLUS
)
{
if
(
!
this
->
left_
->
is_variable
())
if
(
!
this
->
left_
->
is_variable
()
&&
!
this
->
left_
->
is_constant
())
{
temp
=
Statement
::
make_temporary
(
NULL
,
this
->
left_
,
loc
);
inserter
->
insert
(
temp
);
this
->
left_
=
Expression
::
make_temporary_reference
(
temp
,
loc
);
}
if
(
!
this
->
right_
->
is_variable
())
if
(
!
this
->
right_
->
is_variable
()
&&
!
this
->
right_
->
is_constant
())
{
temp
=
Statement
::
make_temporary
(
this
->
left_
->
type
(),
this
->
right_
,
loc
);
...
...
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