From 09262fffd58c8bb1f474aa64c4120967f38d3d00 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 18 Apr 2011 18:40:43 -0400 Subject: 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 --- gcc/cp/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/cp/init.c') 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 -- cgit v1.1