X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=gcc%2Fcp%2Finit.c;h=a88d0c067038a92065f9b44fa8a84a11f25efc97;hp=ff6de3360e5cc7885cfb6a30ed3d3ce42abb17b9;hb=00fe10b0093a5cb120088dd7363e2177d0fed07d;hpb=20715b9c39e3a65de5e0960e7312d4f6800bad83 diff --git a/gcc/cp/init.c b/gcc/cp/init.c index ff6de3360e5..a88d0c06703 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -178,7 +178,8 @@ build_zero_init (tree type, tree nelts, bool static_storage_p) items with static storage duration that are not otherwise initialized are initialized to zero. */ ; - else if (SCALAR_TYPE_P (type)) + else if (SCALAR_TYPE_P (type) + || TREE_CODE (type) == COMPLEX_TYPE) init = convert (type, integer_zero_node); else if (CLASS_TYPE_P (type)) { @@ -248,6 +249,8 @@ build_zero_init (tree type, tree nelts, bool static_storage_p) /* Build a constructor to contain the initializations. */ init = build_constructor (type, v); } + else if (TREE_CODE (type) == VECTOR_TYPE) + init = fold_convert (type, integer_zero_node); else gcc_assert (TREE_CODE (type) == REFERENCE_TYPE);