Commit c8a3d889 by Alexandre Oliva Committed by Alexandre Oliva

init.c (build_vec_init): Test for trivial copy-assignment when copy-assigning arrays.

* init.c (build_vec_init): Test for trivial copy-assignment when
copy-assigning arrays.

From-SVN: r53691
parent 2870428f
2002-05-21 Alexandre Oliva <aoliva@redhat.com>
* init.c (build_vec_init): Test for trivial copy-assignment when
copy-assigning arrays.
2002-05-20 Andreas Jaeger <aj@suse.de>
* init.c (build_default_init): Remove unused variable.
......
......@@ -2774,7 +2774,10 @@ build_vec_init (base, init, from_array)
if (init && TREE_CODE (init) == CONSTRUCTOR && TREE_TYPE (init) == NULL_TREE)
init = digest_init (atype, init, 0);
if (init && !TYPE_NEEDS_CONSTRUCTING (type)
if (init
&& (from_array == 2
? (!CLASS_TYPE_P (type) || !TYPE_HAS_COMPLEX_ASSIGN_REF (type))
: !TYPE_NEEDS_CONSTRUCTING (type))
&& ((TREE_CODE (init) == CONSTRUCTOR
/* Don't do this if the CONSTRUCTOR might contain something
that might throw and require us to clean up. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment