This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/19746] New: printf() optimisation ignores longcall attribute
- From: "jason at catapult dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Feb 2005 01:10:14 -0000
- Subject: [Bug target/19746] New: printf() optimisation ignores longcall attribute
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Using the -O flag, the longcall attribute is ignored by the compiler when
replacing printf() with puts(), even if a prototype for puts() exists with a
long call. The test case below illustrates this.
======
int printf(const char *format, ...) __attribute__ ((__longcall__));
int puts(const char *s) __attribute__ ((__longcall__));
int main(int argc, char* argv[])
{
printf("Should be a long call\n");
return 0;
}
======
At the moment I'm using -fno-builtin-printf as a workaround.
--
Summary: printf() optimisation ignores longcall attribute
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jason at catapult dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: powerpc-eabi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19746