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]

Re: [trans-mem] fix transaction_callable's with asm statements


On 01/12/11 12:10, Richard Henderson wrote:
        /* Handle the easy initialization to zero.  */
-      if (CONSTRUCTOR_ELTS (rhs) == 0)
+      if (CONSTRUCTOR_ELTS (rhs) == 0&&  INTEGRAL_TYPE_P (type))
  	rhs = build_int_cst (type, 0);
While this works, it's not what I intended.  In particular,
you'll never see a CONSTRUCTOR for an integral type, so this
condition will never fire.

What's intended here is to store a zero of the proper size
into the location.  So actually the little change is

rhs = build_int_cst (simple_type, 0);

This should probably be done as a separate fix, since it
turns out to be non-obvious.

Fixed in attached patch and committed.


Ok. You're probably right that the ipa pass needs to be rewritten.
Third time's the charm, right?

I hope so :). I've committed this part of the patch independently.


Thanks. Now, on to the actual bug I was fixing :).

Attachment: curr
Description: Text document


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