public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* middle-end/9986: Incorrect transformation of fputs_unlocked to fputc_unlocked
@ 2003-03-07 1:36 dave.anglin
0 siblings, 0 replies; only message in thread
From: dave.anglin @ 2003-03-07 1:36 UTC (permalink / raw)
To: gcc-gnats
>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:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-03-07 1:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-07 1:36 middle-end/9986: Incorrect transformation of fputs_unlocked to fputc_unlocked dave.anglin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).