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
4b0b30ef
Commit
4b0b30ef
authored
Jan 18, 2016
by
Jason Merrill
Committed by
Jason Merrill
Jan 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* cp-gimplify.c (cp_fold) [CONSTRUCTOR]: Don't clobber the input.
From-SVN: r232524
parent
8d8f3235
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletions
+16
-1
gcc/cp/ChangeLog
+2
-0
gcc/cp/cp-gimplify.c
+14
-1
No files found.
gcc/cp/ChangeLog
View file @
4b0b30ef
2016-01-18 Jason Merrill <jason@redhat.com>
* cp-gimplify.c (cp_fold) [CONSTRUCTOR]: Don't clobber the input.
* cp-gimplify.c (cp_fold): Remove unnecessary special cases.
PR c++/68767
...
...
gcc/cp/cp-gimplify.c
View file @
4b0b30ef
...
...
@@ -2125,9 +2125,22 @@ cp_fold (tree x)
{
unsigned
i
;
constructor_elt
*
p
;
bool
changed
=
false
;
vec
<
constructor_elt
,
va_gc
>
*
elts
=
CONSTRUCTOR_ELTS
(
x
);
vec
<
constructor_elt
,
va_gc
>
*
nelts
=
NULL
;
vec_safe_reserve
(
nelts
,
vec_safe_length
(
elts
));
FOR_EACH_VEC_SAFE_ELT
(
elts
,
i
,
p
)
p
->
value
=
cp_fold
(
p
->
value
);
{
tree
op
=
cp_fold
(
p
->
value
);
constructor_elt
e
=
{
p
->
index
,
op
};
nelts
->
quick_push
(
e
);
if
(
op
!=
p
->
value
)
changed
=
true
;
}
if
(
changed
)
x
=
build_constructor
(
TREE_TYPE
(
x
),
nelts
);
else
vec_free
(
nelts
);
break
;
}
case
TREE_VEC
:
...
...
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