diff options
author | Jason Merrill <jason@redhat.com> | 2010-11-03 22:15:08 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-11-03 22:15:08 -0400 |
commit | dafed7ca0bdb906406efdd84256e1cebde06b94e (patch) | |
tree | 8991911a4ae81fbf5019da8a4b437a3e44e2a825 /gcc/cp/semantics.c | |
parent | bc99421e351e6f3ed3c8b5681179cd76d5f2862f (diff) | |
download | gcc-dafed7ca0bdb906406efdd84256e1cebde06b94e.zip gcc-dafed7ca0bdb906406efdd84256e1cebde06b94e.tar.gz gcc-dafed7ca0bdb906406efdd84256e1cebde06b94e.tar.bz2 |
re PR c++/46293 (constexpr vs. tuple, ice)
PR c++/46293
* semantics.c (build_data_member_initialization): Handle
value-init of aggregate empty base.
From-SVN: r166297
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 562fab1..9061a89 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -5460,6 +5460,14 @@ build_data_member_initialization (tree t, VEC(constructor_elt,gc) **vec) { member = TREE_OPERAND (t, 0); init = unshare_expr (TREE_OPERAND (t, 1)); + if (TREE_CODE (member) == INDIRECT_REF) + { + /* Don't put out anything for value-init of an empty base. */ + gcc_assert (is_empty_class (TREE_TYPE (member))); + gcc_assert (TREE_CODE (init) == CONSTRUCTOR + && CONSTRUCTOR_NELTS (init) == 0); + return true; + } } else { |