This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc 2.95.1 Internal compiler error in `purge_addressof_1', at function.c:3173
- To: gcc-bugs at gcc dot gnu dot org
- Subject: gcc 2.95.1 Internal compiler error in `purge_addressof_1', at function.c:3173
- From: Kevin Nomura <nomura at netapp dot com>
- Date: Wed, 05 Apr 2000 10:51:32 -0700
The GCC version: 2.95.1 and 2.95.2
The system type: DEC Alpha OSF1 V4.0 or V5.0
All options you passed to the compiler: -O2 -c
Preprocessed output of the source file that caused the compiler error, even if the source code can be downloaded from elsewhere: See attachment
=========================================================
[galaxy]$ /usr/local/gcc-2.95.2/bin/gcc -O2 -c gccbug.c
gccbug.c: In function `ftp_gen_html_eplf':
gccbug.c:164: Internal compiler error in `purge_addressof_1', at function.c:3173
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
[galaxy]$
typedef unsigned long size_t;
typedef struct {
char *type;
char *code;
char *icon;
char xfer;
} mimetype;
mimetype *mimetype_txt_lookup(const char *name);
typedef struct {
char *b;
char *e;
} ca_t;
extern void *kmem_alloc(unsigned int km_size, unsigned int km_flags);
char * ca_rspn(char *begin, char *end, const char *s);
char * ca_find(const char *begin, const char *end, char chr);
char * ca_qfind(const char *begin, const char *end, char chr);
char * ca_rfind(char *begin, char *end, char chr);
char * ca_spn(const char *begin, const char *end, const char *s);
char * ca_cspn(const char *begin, const char *end, const char *s);
char * ca_rcspn(char *begin, char *end, const char *s);
char * ca_caspn(char *begin, char *end, const char *s1, const char *s2);
char * ca_ccaspn(char *begin, char *end, const char *s1, const char *s2);
void ca_ws_tok(const char *begin, const char *end, char **tbegin,
char **tend, char *ws);
char * ca_tok(char *buf, char *end, ca_t *tok, const char *sep, const char *ws);
char * ca_rtok(char *buf, char *end, ca_t *tok, const char *sep,
const char *ws);
char * ca_to_str(const char *begin, const char *end);
long ca_to_l(const char *begin, const char *end, char **endptr,
register int base);
int ca_to_hex(const char *begin, const char *end);
void ca_dup(const char *begin, const char *end, char** to_begin, char** to_end);
struct mbuf * ca_to_mbuf(char* begin, char* end);
int ca_cmp(const char *a_begin, const char *a_end, const char *b_begin,
const char *b_end);
int ca_casecmp(const char *a_begin, const char *a_end, const char *b_begin,
const char *b_end);
int ca_prefix(const char *a_begin, const char *a_end, const char *pre_begin,
const char *pre_end);
int ca_caseprefix(const char *a_begin, const char *a_end, const char *pre_begin,
const char *pre_end);
int ca_suffix(const char *a_begin, const char *a_end, const char *suf_begin,
const char *suf_end);
char * ca_ca(char *haystack_begin, char *haystack_end, char *needle_begin,
char *needle_end);
extern int snprintf(char *buf, size_t sz, const char *fmt,...)
__attribute__ ((__format__ (printf, 3, 4)));
struct tm {
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
int tm_gmtoff;
char *tm_zone;
};
typedef int time_t;
struct timeval {
int tv_sec;
int tv_usec;
};
extern struct timeval nc_curtimeval;
static int
ftp_gen_html_eplf(char *buf, char *end, char *eol)
{
char *bufp, *tabc, *date, *file;
ca_t tok;
struct tm modt;
time_t time, nowt;
char type, sizf;
unsigned int size;
int n;
((void)0) ;
eol = ca_rspn(buf, eol, "\r\n");
if ((bufp = buf + 1) >= eol ||
(tabc = ca_find(bufp, eol, '\t')) == eol ||
(eol - tabc + 1 <= 0))
return -1;
file = ca_to_str(tabc+1, eol);
type = '\0';
sizf = '\0';
size = 0;
date = 0;
while (bufp < tabc) {
bufp = ca_tok(bufp, tabc, &tok, ",", "");
if (tok.b == tabc)
break;
switch (*tok.b) {
case 'r':
case '/':
type = *tok.b;
break;
case 's':
if (++tok.b < tok.e)
size = ftp_gen_size(&tok, &sizf);
break;
case 'm':
if (++tok.b >= tok.e)
break;
nowt = nc_curtimeval.tv_sec ;
time = ca_to_l(tok.b, tok.e, 0, 10);
localtime_r(&time, &modt);
date = kmem_alloc(13, 0x00000002 );
strftime(date, 13, (time + ((365 / 2) * ((int) (60 * 60 ) * 24 ) ) > nowt) ?
"%h %e %Y" : "%h %e %H:%M", &modt);
break;
default:
break;
}
}
if (type == '/') {
n = snprintf(buf, end-buf,
"<IMG SRC=\"internal-gopher-menu\" ALT=\"[DIR] \"> "
"<A HREF=\"%s/\">%s</A>%s",
file, file, ftp_filldots(file));
if (date)
n += snprintf(buf+n, end-buf-n, "[%12s]\n", date);
else
n += snprintf(buf+n, end-buf-n, "\n");
} else if (type == 'r') {
mimetype *mtype = mimetype_txt_lookup(file);
n = snprintf(buf, end-buf,
"<IMG SRC=\"internal-gopher-%s\" ALT=\"[FILE]\"> "
"<A HREF=\"%s\">%s</A>%s",
mtype->icon, file, file, ftp_filldots(file));
if (date)
n += snprintf(buf+n, end-buf-n, "[%12s]", date);
else
n += snprintf(buf+n, end-buf-n, " ");
if (sizf)
n += snprintf(buf+n, end-buf-n, " %6d%c\n", size, sizf);
else
n += snprintf(buf+n, end-buf-n, "\n");
} else {
n = 0;
}
if (file)
kmem_free(file);
if (date)
kmem_free(date);
return n > 0 && n < end-buf ? 0 : -1;
}