[testcase] Simplified testcases why current gcc trunk cannot compile glibc

Jakub Jelinek jakub@redhat.com
Mon Oct 15 14:02:00 GMT 2001


On Mon, Oct 15, 2001 at 01:27:15PM -0700, Richard Henderson wrote:
> On Mon, Oct 15, 2001 at 04:18:21PM -0400, Roland McGrath wrote:
> > Why not support it more directly?  That is, something in `asm' syntax that
> > constitutes a proper reference to the function so that the compiler neither
> > warns about it being unused nor fails to emit the code.  
> 
> Hmm.  Changing extended asms to accept arguments outside of functions
> wouldn't be a bad idea anyway -- lots of times we just want constant
> integer arguments such as offsetoff(my_struct, member).

Yeah, sure. Unfortunately, it wouldn't help in this case (ld.so is flag_pic,
thus both "s" and "i" constraints don't work and "m" or "r" really need
function context (since gcc has to set the arguments up).
I prefer something like __attribute__((used)) and __attribute__((noinline)),
where the first one would mark some thing referenced (which is somewhat
different to saying it is ok that it is unused) and noinline attribute would
be far better than the various tricks how to force function not to be
inlined which stop working with newer and newer gccs (like glibc used
alloca(sizeof(int)); to avoid inlining).

	Jakub



More information about the Gcc-patches mailing list