This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR c++/19263


Hi!

The CONSTRUCTOR_ELTS (init) = NULL which is desirable for the
static initializer that is left in DECL_INITIAL () unfortunately
kills the initializer fields used in the MODIFY_EXPR too:

     case VECTOR_TYPE:
       if (!initializer_constant_valid_p (init, type))
        {
          CONSTRUCTOR_ELTS (init) = NULL;
          code = build2 (MODIFY_EXPR, type, dest, init);
          code = build_stmt (EXPR_STMT, code);
          add_stmt (code);
        }

so all vector initializers that get into split_nonconstant_init
are changed into zero vector initializers.

3.4.x code has another problem, although it created an EXPR_STMT
with MODIFY_EXPR in it, it did not store it to *pcode, so it
was thrown away.

I'm attaching separate HEAD and 3.4 patches, ok to commit if
testing passes?

	Jakub

Attachment: PR19263-HEAD
Description: Text document

Attachment: PR19263-3.4
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]