This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
ASM_OUTPUT_EXTERNAL called for __builtin_ function
- From: Anders Ådland <aaadland at atmel dot no>
- To: gcc-list <gcc at gcc dot gnu dot org>
- Date: Thu, 28 Aug 2003 16:44:52 +0200
- Subject: 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