diff options
author | Patrick Palka <ppalka@redhat.com> | 2020-05-15 14:50:17 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2020-05-15 14:50:17 -0400 |
commit | 289fbbe75f6d1c69605fcfde769ac46944c14a4a (patch) | |
tree | 05140a4e596705204fd2404eac3bf4503d70a576 /gcc/cp/typeck2.c | |
parent | cda6396a1b6e6bba2a3b0847931567c3458f2184 (diff) | |
download | gcc-289fbbe75f6d1c69605fcfde769ac46944c14a4a.zip gcc-289fbbe75f6d1c69605fcfde769ac46944c14a4a.tar.gz gcc-289fbbe75f6d1c69605fcfde769ac46944c14a4a.tar.bz2 |
c++: Revert unnecessary parts of fix for [PR90996]
The process_init_constructor_array part of my PR90996 patch turns out to
be neither necessary nor sufficient to make the pr90996.C testcase work,
and I wasn't able to come up with a testcase that demonstrates this part
is ever necessary.
gcc/cp/ChangeLog:
Revert:
2020-04-07 Patrick Palka <ppalka@redhat.com>
PR c++/90996
* typeck2.c (process_init_constructor_array): Propagate
CONSTRUCTOR_PLACEHOLDER_BOUNDARY up from each element
initializer to the array initializer.
gcc/testsuite/ChangeLog:
PR c++/90996
* g++.dg/cpp1y/pr90996.C: Turn into execution test to verify
that each PLACEHOLDER_EXPR gets correctly resolved.
Diffstat (limited to 'gcc/cp/typeck2.c')
-rw-r--r-- | gcc/cp/typeck2.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index af84c25..5fd3b82 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -1496,17 +1496,6 @@ process_init_constructor_array (tree type, tree init, int nested, int flags, = massage_init_elt (TREE_TYPE (type), ce->value, nested, flags, complain); - if (TREE_CODE (ce->value) == CONSTRUCTOR - && CONSTRUCTOR_PLACEHOLDER_BOUNDARY (ce->value)) - { - /* Shift CONSTRUCTOR_PLACEHOLDER_BOUNDARY from the element initializer - up to the array initializer, so that the call to - replace_placeholders from store_init_value can resolve any - PLACEHOLDER_EXPRs inside this element initializer. */ - CONSTRUCTOR_PLACEHOLDER_BOUNDARY (ce->value) = 0; - CONSTRUCTOR_PLACEHOLDER_BOUNDARY (init) = 1; - } - gcc_checking_assert (ce->value == error_mark_node || (same_type_ignoring_top_level_qualifiers_p @@ -1535,13 +1524,6 @@ process_init_constructor_array (tree type, tree init, int nested, int flags, /* The default zero-initialization is fine for us; don't add anything to the CONSTRUCTOR. */ next = NULL_TREE; - else if (TREE_CODE (next) == CONSTRUCTOR - && CONSTRUCTOR_PLACEHOLDER_BOUNDARY (next)) - { - /* As above. */ - CONSTRUCTOR_PLACEHOLDER_BOUNDARY (next) = 0; - CONSTRUCTOR_PLACEHOLDER_BOUNDARY (init) = 1; - } } else if (!zero_init_p (TREE_TYPE (type))) next = build_zero_init (TREE_TYPE (type), |