This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [trans-mem] fix transaction_callable's with asm statements
- From: Richard Henderson <rth at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 12 Jan 2011 10:10:00 -0800
- Subject: Re: [trans-mem] fix transaction_callable's with asm statements
- References: <4D2CAFEB.2020607@redhat.com>
> /* 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.
> + /* If we saw something that will make us go irrevocable, put it
> + in the worklist so we can scan the function later
> + (ipa_tm_scan_irr_function) and mark the irrevocable
> + blocks. */
> + if (node->local.tm_may_enter_irr)
> + maybe_push_queue (node, &worklist, &d->in_worklist);
Ok. You're probably right that the ipa pass needs to be rewritten.
Third time's the charm, right?
r~