aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/init.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-04-18 18:40:43 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-04-18 18:40:43 -0400
commit09262fffd58c8bb1f474aa64c4120967f38d3d00 (patch)
tree41e6fbd08898256b168e95f35c46f9669f99d746 /gcc/cp/init.c
parent848257079a98c2fa9c7d5a8cc666f7c0798e5ec0 (diff)
downloadgcc-09262fffd58c8bb1f474aa64c4120967f38d3d00.zip
gcc-09262fffd58c8bb1f474aa64c4120967f38d3d00.tar.gz
gcc-09262fffd58c8bb1f474aa64c4120967f38d3d00.tar.bz2
re PR c++/48537 (C++0x: ICE using union with non-trivial member)
PR c++/48537 * init.c (build_value_init): Handle UNION_TYPE the same. From-SVN: r172678
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r--gcc/cp/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 3280d9b..04d2bb2 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -343,7 +343,7 @@ build_value_init (tree type, tsubst_flags_t complain)
NULL, type, LOOKUP_NORMAL,
complain),
complain);
- else if (TREE_CODE (type) != UNION_TYPE && TYPE_NEEDS_CONSTRUCTING (type))
+ else if (TYPE_NEEDS_CONSTRUCTING (type))
{
/* This is a class that needs constructing, but doesn't have
a user-provided constructor. So we need to zero-initialize