PR middle-end/52141: ICE due to asm statement

Richard Henderson rth@redhat.com
Wed Feb 15 17:35:00 GMT 2012


On 02/15/2012 01:48 AM, Richard Guenther wrote:
> Hmm.  I think you rather want to teach local_pure_const about TM
> properties you want to know and have them propagated properly
> (of course unless pure/const which is about optimization and has an
> easy fallback default yours wouldn't have that - you'd have to assume
> the callee contains an invalid asm ...)

That's more or less what we do ourselves during the tm ipa pass.

The trouble we have here is merely one of diagnostics.  The user
has written "transaction safe" and it's now our job to tell him
when he's done something that's not transaction safe.

The unfortunate thing of diagnostics is you'd like to be able to
tell the user what they did wrong at the source level, not after
10 levels of inlining.

And given that pass_local_pure_const still runs after pass_early_inline,
doing anything in there doesn't really help the problem at all.


r~



More information about the Gcc-patches mailing list