This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ASM_OUTPUT_EXTERNAL called for __builtin_ function


After preprocessing, the gcc.c-torture/execute/921007-1.c test program looks like this:
-------------
static int strcmp(){return-1;}


main()
{
if(__builtin_strcmp("X","X\376")>=0)abort();
exit(0);
}
-------------
Why is "strcmp" sent to ASM_OUTPUT_EXTERNAL(), it is builtin and never called? This is only done if the static version of strcmp is declared. Is this a bug in my port, or is this normal for all targets? (It is probably a bug, and the test program is written to find it...)


In my port, calling ASM_OUTPUT_EXTERNAL() means printing "extern <symbol>". But because "strcmp" is already used for the static function, I'm getting an assembler error. How do I solve this?

Anders


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]