[PATCH] Disallow inlining if static vars in that function contain addresses of that function's labels (PR tree-optimization/29484)
Andi Kleen
andi@firstfloor.org
Thu Jan 3 18:04:00 GMT 2008
Jakub Jelinek <jakub@redhat.com> writes:
> Smalltalk example Paolo mentioned will work just fine, GCC won't
> try to inline that function, and I think we should keep it that way.
FWIW Older versions of the Linux kernel used &&label in an inline to
get the current text address for debugging output purposes. Of course
no requirement that it is unique. While that has changed it would be
good if that still worked. In particular not inlining that function would
probably cause significant code growth.
-Andi
More information about the Gcc
mailing list