This is the mail archive of the
mailing list for the GCC project.
Re: PR middle-end/52141: ICE due to asm statement
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Aldy Hernandez <aldyh at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 15 Feb 2012 10:48:14 +0100
- Subject: Re: PR middle-end/52141: ICE due to asm statement
- References: <4F3A8FF4.firstname.lastname@example.org> <4F3A9E4E.email@example.com>
On Tue, Feb 14, 2012 at 6:47 PM, Richard Henderson <firstname.lastname@example.org> wrote:
> On 02/14/2012 08:46 AM, Aldy Hernandez wrote:
>> The call to ipa_tm_diagnose_tm_safe() does nothing because there are no longer any calls in the function, since the function call has been inlined:
>> f ()
>> <bb 2>:
>> ? __asm__ __volatile__("");
>> ? return;
>> Perhaps we could issue the error when we notice the GIMPLE_ASM while scanning for irrevocable blocks earlier. ?The attached patch does so, and fixes the PR.
>> What am I missing, cause I *know* there's a rat's nest somewhere.
> Which means that the error message is all too likely simply be confusing
> rather than anything else, since the asm isn't lexically present in the
> I wonder, not for the first time, if we shouldn't simply turn off early
> inlining with TM, or at least of and into tm-related functions, such as
> this. ?I assume that the IPA inlining pass would take up the slack...
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 ...)