public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Inlining function into itself (via transitivity
@ 2004-01-21 14:20 Josef Zlomek
  2004-01-21 16:47 ` Geoff Keating
  0 siblings, 1 reply; 3+ messages in thread
From: Josef Zlomek @ 2004-01-21 14:20 UTC (permalink / raw)
  To: gcc

Hello,

is it correct to inline function into itself (via transitivity), i.e.

a <-- b <-- c <-- a

where x <-- y means that y is inlined into x.

Thanks for answer.

Joe

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Inlining function into itself (via transitivity
  2004-01-21 14:20 Inlining function into itself (via transitivity Josef Zlomek
@ 2004-01-21 16:47 ` Geoff Keating
  2004-01-21 18:13   ` Josef Zlomek
  0 siblings, 1 reply; 3+ messages in thread
From: Geoff Keating @ 2004-01-21 16:47 UTC (permalink / raw)
  To: Josef Zlomek; +Cc: gcc

Josef Zlomek <zlomj9am@artax.karlin.mff.cuni.cz> writes:

> Hello,
> 
> is it correct to inline function into itself (via transitivity), i.e.
> 
> a <-- b <-- c <-- a
> 
> where x <-- y means that y is inlined into x.
> 
> Thanks for answer.

Yes, this can be done without changing the meaning of the program.  It
is often pointless, though.

You can even inline a routine directly into itself, like:

a <-- a

although this is very often pointless.

-- 
- Geoffrey Keating <geoffk@geoffk.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Inlining function into itself (via transitivity
  2004-01-21 16:47 ` Geoff Keating
@ 2004-01-21 18:13   ` Josef Zlomek
  0 siblings, 0 replies; 3+ messages in thread
From: Josef Zlomek @ 2004-01-21 18:13 UTC (permalink / raw)
  To: Geoff Keating; +Cc: gcc

> > is it correct to inline function into itself (via transitivity), i.e.
> > 
> > a <-- b <-- c <-- a
> > 
> > where x <-- y means that y is inlined into x.
> > 
> > Thanks for answer.
> 
> Yes, this can be done without changing the meaning of the program.  It
> is often pointless, though.

I have a testcase which GCC (mainline) gets ICE (because of jump to undefined
label) on.
First it inlines a <-- b, then b <-- a.
I have probably found the problem, I'm going to make a patch.

Josef

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-01-21 18:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-21 14:20 Inlining function into itself (via transitivity Josef Zlomek
2004-01-21 16:47 ` Geoff Keating
2004-01-21 18:13   ` Josef Zlomek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).