middle-end/9986: Incorrect transformation of fputs_unlocked to fputc_unlocked
dave.anglin@nrc.ca
dave.anglin@nrc.ca
Fri Mar 7 01:59:00 GMT 2003
>Number: 9986
>Category: middle-end
>Synopsis: Incorrect transformation of fputs_unlocked to fputc_unlocked
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 07 01:36:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Dave Anglin
>Release: gcc 3.2 branch and later
>Organization:
>Environment:
hppa1.1-hp-hpux10.20
>Description:
HP-UX 10.20 has fputs_unlocked in libc. However, it doesn't
have fputc_unlocked. GCC appears to optimize a call to
fputs_unlocked with a character count of one to a call to
fputc_unlocked. This fails on HP-UX 10.20. Here is a
little test program, "fputc_unlocked.c", which demonstates
the problem:
typedef struct {
int __cnt;
unsigned char *__ptr;
unsigned char *__base;
unsigned short __flag;
unsigned char __fileL;
unsigned char __fileH;
} FILE;
extern FILE __iob[];
extern char *fgets_unlocked(char *, int, FILE *);
int main ()
{
fputs_unlocked ("\n", (&__iob[1]));
}
516 (hiauly1)dave> /opt/gnu/bin/gcc -o fputc_unlocked fputc_unlocked.c -O1
/usr/ccs/bin/ld: Unsatisfied symbols:
fputc_unlocked (code)
collect2: ld returned 1 exit status
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list