diff options
author | Jason Merrill <jason@redhat.com> | 2011-04-18 18:40:43 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-04-18 18:40:43 -0400 |
commit | 09262fffd58c8bb1f474aa64c4120967f38d3d00 (patch) | |
tree | 41e6fbd08898256b168e95f35c46f9669f99d746 /gcc/cp | |
parent | 848257079a98c2fa9c7d5a8cc666f7c0798e5ec0 (diff) | |
download | gcc-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')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/init.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e7d75e8..cf21fd6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2011-04-18 Jason Merrill <jason@redhat.com> + + PR c++/48537 + * init.c (build_value_init): Handle UNION_TYPE the same. + 2011-04-18 Jakub Jelinek <jakub@redhat.com> PR c++/48632 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 |