m68k -mcpu32 current CVS crashes
Stephen L Moshier
moshier@mediaone.net
Mon Feb 26 10:40:00 GMT 2001
This compiler crash occurs with current CVS sources:
Reading specs from /usr/local/lib/gcc-lib/m68k-coff/3.1/specs
Configured with: ccdir/configure --host=i486-linux-gnu --target=m68k-coff
gcc version 3.1 20010226 (experimental)
The source code is from newlib-1.9.0; .i file below.
The -mcpu32 switch is important. Several other machine switches do
not produce a crash. An md bug?
m68k-coff-gcc -B/arc/gnu/newlib-build/m68k-coff/newlib/ -isystem /arc/gnu/newlib-build/m68k-coff/newlib/targ-include -isystem /arc/gnu/newlib-build/ccdir/newlib/libc/include -DPACKAGE=\"newlib\" -DVERSION=\"1.9.0\" -I. -I../../../../../ccdir/newlib/libc/stdio -O2 -DMISSING_SYSCALL_NAMES -I../../targ-include -I../../../../../ccdir/newlib/libc/../libc/include -fno-builtin -g -O2 -mcpu32 -c ../../../../../ccdir/newlib/libc/stdio/mktemp.c
../../../../../ccdir/newlib/libc/stdio/mktemp.c: In function `_gettemp':
../../../../../ccdir/newlib/libc/stdio/mktemp.c:120: Internal compiler error in gen_umulsi3_highpart, at insn-emit.c:3103
Please submit a full bug report, with preprocessed source if appropriate.
See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.
make[5]: *** [mktemp.o] Error 1
make[5]: Leaving directory `/arc/gnu/newlib-build/m68k-coff/mcpu32/newlib/libc/stdio'
--------- mktemp.i-----------------
# 97 "../../../../../ccdir/newlib/libc/stdio/mktemp.c"
# 1 "../../../../../ccdir/newlib/libc/include/sys/types.h" 1
# 31 "../../../../../ccdir/newlib/libc/include/sys/types.h"
# 1 "/usr/local/lib/gcc-lib/m68k-coff/3.1/include/stddef.h" 1 3
# 147 "/usr/local/lib/gcc-lib/m68k-coff/3.1/include/stddef.h" 3
typedef long int ptrdiff_t;
# 199 "/usr/local/lib/gcc-lib/m68k-coff/3.1/include/stddef.h" 3
typedef long unsigned int size_t;
# 287 "/usr/local/lib/gcc-lib/m68k-coff/3.1/include/stddef.h" 3
typedef long int wchar_t;
# 32 "../../../../../ccdir/newlib/libc/include/sys/types.h" 2
# 1 "../../../../../ccdir/newlib/libc/include/machine/types.h" 1
# 33 "../../../../../ccdir/newlib/libc/include/sys/types.h" 2
# 53 "../../../../../ccdir/newlib/libc/include/sys/types.h"
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long clock_t;
typedef long time_t;
struct timespec {
time_t tv_sec;
long tv_nsec;
};
struct itimerspec {
struct timespec it_interval;
struct timespec it_value;
};
typedef long daddr_t;
typedef char * caddr_t;
typedef unsigned short ino_t;
# 126 "../../../../../ccdir/newlib/libc/include/sys/types.h"
typedef short dev_t;
typedef long off_t;
typedef unsigned short uid_t;
typedef unsigned short gid_t;
typedef int pid_t;
typedef long key_t;
typedef long ssize_t;
# 148 "../../../../../ccdir/newlib/libc/include/sys/types.h"
typedef unsigned int mode_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned short nlink_t;
# 172 "../../../../../ccdir/newlib/libc/include/sys/types.h"
typedef long fd_mask;
typedef struct _types_fd_set {
fd_mask fds_bits[(((64)+(((sizeof (fd_mask) * 8))-1))/((sizeof (fd_mask) * 8)))];
} _types_fd_set;
# 98 "../../../../../ccdir/newlib/libc/stdio/mktemp.c" 2
# 1 "../../../../../ccdir/newlib/libc/include/fcntl.h" 1
# 1 "../../../../../ccdir/newlib/libc/include/sys/fcntl.h" 1
# 1 "../../../../../ccdir/newlib/libc/include/_ansi.h" 1
# 15 "../../../../../ccdir/newlib/libc/include/_ansi.h"
# 1 "../../../../../ccdir/newlib/libc/include/sys/config.h" 1
# 113 "../../../../../ccdir/newlib/libc/include/sys/config.h"
typedef int __int32_t;
typedef unsigned int __uint32_t;
# 16 "../../../../../ccdir/newlib/libc/include/_ansi.h" 2
# 8 "../../../../../ccdir/newlib/libc/include/sys/fcntl.h" 2
# 139 "../../../../../ccdir/newlib/libc/include/sys/fcntl.h"
struct flock {
short l_type;
short l_whence;
long l_start;
long l_len;
short l_pid;
short l_xxx;
};
struct eflock {
short l_type;
short l_whence;
long l_start;
long l_len;
short l_pid;
short l_xxx;
long l_rpid;
long l_rsys;
};
# 1 "../../../../../ccdir/newlib/libc/include/sys/types.h" 1
# 164 "../../../../../ccdir/newlib/libc/include/sys/fcntl.h" 2
# 1 "../../../../../ccdir/newlib/libc/include/sys/stat.h" 1
# 1 "../../../../../ccdir/newlib/libc/include/_ansi.h" 1
# 9 "../../../../../ccdir/newlib/libc/include/sys/stat.h" 2
# 1 "../../../../../ccdir/newlib/libc/include/time.h" 1
# 10 "../../../../../ccdir/newlib/libc/include/time.h"
# 1 "../../../../../ccdir/newlib/libc/include/_ansi.h" 1
# 11 "../../../../../ccdir/newlib/libc/include/time.h" 2
# 21 "../../../../../ccdir/newlib/libc/include/time.h"
# 1 "../../../../../ccdir/newlib/libc/include/machine/time.h" 1
# 22 "../../../../../ccdir/newlib/libc/include/time.h" 2
# 30 "../../../../../ccdir/newlib/libc/include/time.h"
# 1 "/usr/local/lib/gcc-lib/m68k-coff/3.1/include/stddef.h" 1 3
# 31 "../../../../../ccdir/newlib/libc/include/time.h" 2
# 1 "../../../../../ccdir/newlib/libc/include/sys/types.h" 1
# 33 "../../../../../ccdir/newlib/libc/include/time.h" 2
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;
};
clock_t clock (void);
double difftime (time_t _time2, time_t _time1);
time_t mktime (struct tm *_timeptr);
time_t time (time_t *_timer);
char *asctime (const struct tm *_tblock);
char *ctime (const time_t *_time);
struct tm *gmtime (const time_t *_timer);
struct tm *localtime (const time_t *_timer);
size_t strftime (char *_s, size_t _maxsize, const char *_fmt, const struct tm *_t);
char *asctime_r (const struct tm *, char *);
char *ctime_r (const time_t *, char *);
struct tm *gmtime_r (const time_t *, struct tm *);
struct tm *localtime_r (const time_t *, struct tm *);
# 75 "../../../../../ccdir/newlib/libc/include/time.h"
# 1 "../../../../../ccdir/newlib/libc/include/sys/features.h" 1
# 76 "../../../../../ccdir/newlib/libc/include/time.h" 2
# 10 "../../../../../ccdir/newlib/libc/include/sys/stat.h" 2
# 1 "../../../../../ccdir/newlib/libc/include/sys/types.h" 1
# 11 "../../../../../ccdir/newlib/libc/include/sys/stat.h" 2
# 25 "../../../../../ccdir/newlib/libc/include/sys/stat.h"
struct stat
{
dev_t st_dev;
ino_t st_ino;
mode_t st_mode;
nlink_t st_nlink;
uid_t st_uid;
gid_t st_gid;
dev_t st_rdev;
off_t st_size;
time_t st_atime;
long st_spare1;
time_t st_mtime;
long st_spare2;
time_t st_ctime;
long st_spare3;
long st_blksize;
long st_blocks;
long st_spare4[2];
};
# 119 "../../../../../ccdir/newlib/libc/include/sys/stat.h"
int chmod ( const char *__path, mode_t __mode );
int fchmod (int __fd, mode_t __mode);
int fstat ( int __fd, struct stat *__sbuf );
int mkdir ( const char *_path, mode_t __mode );
int mkfifo ( const char *__path, mode_t __mode );
int stat ( const char *__path, struct stat *__sbuf );
mode_t umask ( mode_t __mask );
# 134 "../../../../../ccdir/newlib/libc/include/sys/stat.h"
int _fstat ( int __fd, struct stat *__sbuf );
int _stat ( const char *__path, struct stat *__sbuf );
# 165 "../../../../../ccdir/newlib/libc/include/sys/fcntl.h" 2
extern int open (const char *, int, ...);
extern int creat (const char *, mode_t);
extern int fcntl (int, int, ...);
extern int _open (const char *, int, ...);
extern int _fcntl (int, int, ...);
# 2 "../../../../../ccdir/newlib/libc/include/fcntl.h" 2
# 99 "../../../../../ccdir/newlib/libc/stdio/mktemp.c" 2
# 1 "../../../../../ccdir/newlib/libc/include/sys/stat.h" 1
# 100 "../../../../../ccdir/newlib/libc/stdio/mktemp.c" 2
# 1 "../../../../../ccdir/newlib/libc/include/errno.h" 1
# 1 "../../../../../ccdir/newlib/libc/include/sys/errno.h" 1
# 11 "../../../../../ccdir/newlib/libc/include/sys/errno.h"
# 1 "../../../../../ccdir/newlib/libc/include/sys/reent.h" 1
# 13 "../../../../../ccdir/newlib/libc/include/sys/reent.h"
# 1 "../../../../../ccdir/newlib/libc/include/_ansi.h" 1
# 14 "../../../../../ccdir/newlib/libc/include/sys/reent.h" 2
# 1 "../../../../../ccdir/newlib/libc/include/time.h" 1
# 15 "../../../../../ccdir/newlib/libc/include/sys/reent.h" 2
# 28 "../../../../../ccdir/newlib/libc/include/sys/reent.h"
typedef __uint32_t __ULong;
struct _glue
{
struct _glue *_next;
int _niobs;
struct __sFILE *_iobs;
};
struct _Bigint
{
struct _Bigint *_next;
int _k, _maxwds, _sign, _wds;
__ULong _x[1];
};
struct _atexit {
struct _atexit *_next;
int _ind;
void (*_fns[32])(void);
};
# 64 "../../../../../ccdir/newlib/libc/include/sys/reent.h"
struct __sbuf {
unsigned char *_base;
int _size;
};
typedef long _fpos_t;
# 102 "../../../../../ccdir/newlib/libc/include/sys/reent.h"
struct __sFILE {
unsigned char *_p;
int _r;
int _w;
short _flags;
short _file;
struct __sbuf _bf;
int _lbfsize;
void * _cookie;
int (*_read) (void * _cookie, char *_buf, int _n);
int (*_write) (void * _cookie, const char *_buf, int _n);
_fpos_t (*_seek) (void * _cookie, _fpos_t _offset, int _whence);
int (*_close) (void * _cookie);
struct __sbuf _ub;
unsigned char *_up;
int _ur;
unsigned char _ubuf[3];
unsigned char _nbuf[1];
struct __sbuf _lb;
int _blksize;
int _offset;
struct _reent *_data;
};
# 146 "../../../../../ccdir/newlib/libc/include/sys/reent.h"
struct _reent
{
int _errno;
struct __sFILE *_stdin, *_stdout, *_stderr;
int _inc;
char _emergency[25];
int _current_category;
const char *_current_locale;
int __sdidinit;
void (*__cleanup) (struct _reent *);
struct _Bigint *_result;
int _result_k;
struct _Bigint *_p5s;
struct _Bigint **_freelist;
int _cvtlen;
char *_cvtbuf;
union
{
struct
{
unsigned int _unused_rand;
char * _strtok_last;
char _asctime_buf[26];
struct tm _localtime_buf;
int _gamma_signgam;
__extension__ unsigned long long _rand_next;
} _reent;
struct
{
unsigned char * _nextf[30];
unsigned int _nmalloc[30];
} _unused;
} _new;
struct _atexit *_atexit;
struct _atexit _atexit0;
void (**(_sig_func))(int);
struct _glue __sglue;
struct __sFILE __sf[3];
};
# 227 "../../../../../ccdir/newlib/libc/include/sys/reent.h"
extern struct _reent *_impure_ptr ;
void _reclaim_reent (struct _reent *);
# 12 "../../../../../ccdir/newlib/libc/include/sys/errno.h" 2
extern int *__errno (void);
extern const char * const _sys_errlist[];
extern int _sys_nerr;
# 2 "../../../../../ccdir/newlib/libc/include/errno.h" 2
# 101 "../../../../../ccdir/newlib/libc/stdio/mktemp.c" 2
# 1 "../../../../../ccdir/newlib/libc/include/stdio.h" 1
# 32 "../../../../../ccdir/newlib/libc/include/stdio.h"
# 1 "../../../../../ccdir/newlib/libc/include/_ansi.h" 1
# 33 "../../../../../ccdir/newlib/libc/include/stdio.h" 2
# 1 "/usr/local/lib/gcc-lib/m68k-coff/3.1/include/stddef.h" 1 3
# 38 "../../../../../ccdir/newlib/libc/include/stdio.h" 2
# 1 "/usr/local/lib/gcc-lib/m68k-coff/3.1/include/stdarg.h" 1 3
# 43 "/usr/local/lib/gcc-lib/m68k-coff/3.1/include/stdarg.h" 3
typedef __builtin_va_list __gnuc_va_list;
# 41 "../../../../../ccdir/newlib/libc/include/stdio.h" 2
# 1 "../../../../../ccdir/newlib/libc/include/sys/reent.h" 1
# 49 "../../../../../ccdir/newlib/libc/include/stdio.h" 2
typedef _fpos_t fpos_t;
typedef struct __sFILE FILE;
# 131 "../../../../../ccdir/newlib/libc/include/stdio.h"
int remove (const char *);
int rename (const char *, const char *);
char * tempnam (const char *, const char *);
FILE * tmpfile (void);
char * tmpnam (char *);
int fclose (FILE *);
int fflush (FILE *);
FILE * freopen (const char *, const char *, FILE *);
void setbuf (FILE *, char *);
int setvbuf (FILE *, char *, int, size_t);
int fprintf (FILE *, const char *, ...);
int fscanf (FILE *, const char *, ...);
int printf (const char *, ...);
int scanf (const char *, ...);
int sscanf (const char *, const char *, ...);
int vfprintf (FILE *, const char *, __gnuc_va_list);
int vprintf (const char *, __gnuc_va_list);
int vsprintf (char *, const char *, __gnuc_va_list);
int vsnprintf (char *, size_t, const char *, __gnuc_va_list);
int fgetc (FILE *);
char * fgets (char *, int, FILE *);
int fputc (int, FILE *);
int fputs (const char *, FILE *);
int getc (FILE *);
int getchar (void);
char * gets (char *);
int putc (int, FILE *);
int putchar (int);
int puts (const char *);
int ungetc (int, FILE *);
size_t fread (void *, size_t _size, size_t _n, FILE *);
size_t fwrite (const void * , size_t _size, size_t _n, FILE *);
int fgetpos (FILE *, fpos_t *);
int fseek (FILE *, long, int);
int fsetpos (FILE *, const fpos_t *);
long ftell ( FILE *);
void rewind (FILE *);
void clearerr (FILE *);
int feof (FILE *);
int ferror (FILE *);
void perror (const char *);
FILE * fopen (const char *_name, const char *_type);
int sprintf (char *, const char *, ...);
int snprintf (char *, size_t, const char *, ...);
int vfiprintf (FILE *, const char *, __gnuc_va_list);
int iprintf (const char *, ...);
int fiprintf (FILE *, const char *, ...);
int siprintf (char *, const char *, ...);
# 191 "../../../../../ccdir/newlib/libc/include/stdio.h"
FILE * fdopen (int, const char *);
int fileno (FILE *);
int getw (FILE *);
int pclose (FILE *);
FILE * popen (const char *, const char *);
int putw (int, FILE *);
void setbuffer (FILE *, char *, int);
int setlinebuf (FILE *);
FILE * _fdopen_r (struct _reent *, int, const char *);
FILE * _fopen_r (struct _reent *, const char *, const char *);
int _getchar_r (struct _reent *);
char * _gets_r (struct _reent *, char *);
int _iprintf_r (struct _reent *, const char *, ...);
int _mkstemp_r (struct _reent *, char *);
char * _mktemp_r (struct _reent *, char *);
void _perror_r (struct _reent *, const char *);
int _printf_r (struct _reent *, const char *, ...);
int _putchar_r (struct _reent *, int);
int _puts_r (struct _reent *, const char *);
int _remove_r (struct _reent *, const char *);
int _rename_r (struct _reent *, const char *_old, const char *_new);
int _scanf_r (struct _reent *, const char *, ...);
int _sprintf_r (struct _reent *, char *, const char *, ...);
int _snprintf_r (struct _reent *, char *, size_t, const char *, ...);
char * _tempnam_r (struct _reent *, const char *, const char *);
FILE * _tmpfile_r (struct _reent *);
char * _tmpnam_r (struct _reent *, char *);
int _vfprintf_r (struct _reent *, FILE *, const char *, __gnuc_va_list);
int _vprintf_r (struct _reent *, const char *, __gnuc_va_list);
int _vsprintf_r (struct _reent *, char *, const char *, __gnuc_va_list);
int _vsnprintf_r (struct _reent *, char *, size_t, const char *, __gnuc_va_list);
int __srget (FILE *);
int __swbuf (int, FILE *);
FILE *funopen (const void * _cookie, int (*readfn)(void * _cookie, char *_buf, int _n), int (*writefn)(void * _cookie, const char *_buf, int _n), fpos_t (*seekfn)(void * _cookie, fpos_t _off, int _whence), int (*closefn)(void * _cookie));
# 102 "../../../../../ccdir/newlib/libc/stdio/mktemp.c" 2
# 1 "../../../../../ccdir/newlib/libc/include/ctype.h" 1
# 1 "../../../../../ccdir/newlib/libc/include/_ansi.h" 1
# 8 "../../../../../ccdir/newlib/libc/include/ctype.h" 2
int isalnum (int __c);
int isalpha (int __c);
int iscntrl (int __c);
int isdigit (int __c);
int isgraph (int __c);
int islower (int __c);
int isprint (int __c);
int ispunct (int __c);
int isspace (int __c);
int isupper (int __c);
int isxdigit (int __c);
int tolower (int __c);
int toupper (int __c);
int isascii (int __c);
int toascii (int __c);
int _tolower (int __c);
int _toupper (int __c);
# 39 "../../../../../ccdir/newlib/libc/include/ctype.h"
extern const char _ctype_[];
# 103 "../../../../../ccdir/newlib/libc/stdio/mktemp.c" 2
# 1 "../../../../../ccdir/newlib/libc/include/reent.h" 1
# 48 "../../../../../ccdir/newlib/libc/include/reent.h"
# 1 "../../../../../ccdir/newlib/libc/include/sys/reent.h" 1
# 49 "../../../../../ccdir/newlib/libc/include/reent.h" 2
# 1 "../../../../../ccdir/newlib/libc/include/sys/_types.h" 1
# 12 "../../../../../ccdir/newlib/libc/include/sys/_types.h"
typedef long _off_t;
typedef long _ssize_t;
# 50 "../../../../../ccdir/newlib/libc/include/reent.h" 2
# 1 "../../../../../ccdir/newlib/libc/include/machine/types.h" 1
# 51 "../../../../../ccdir/newlib/libc/include/reent.h" 2
# 1 "/usr/local/lib/gcc-lib/m68k-coff/3.1/include/stddef.h" 1 3
# 54 "../../../../../ccdir/newlib/libc/include/reent.h" 2
struct stat;
struct tms;
struct timeval;
struct timezone;
extern int _close_r (struct _reent *, int);
extern int _execve_r (struct _reent *, char *, char **, char **);
extern int _fcntl_r (struct _reent *, int, int, int);
extern int _fork_r (struct _reent *);
extern int _fstat_r (struct _reent *, int, struct stat *);
extern int _getpid_r (struct _reent *);
extern int _kill_r (struct _reent *, int, int);
extern int _link_r (struct _reent *, const char *, const char *);
extern _off_t _lseek_r (struct _reent *, int, _off_t, int);
extern int _open_r (struct _reent *, const char *, int, int);
extern _ssize_t _read_r (struct _reent *, int, void *, size_t);
extern void *_sbrk_r (struct _reent *, size_t);
extern int _stat_r (struct _reent *, const char *, struct stat *);
extern unsigned long _times_r (struct _reent *, struct tms *);
extern int _unlink_r (struct _reent *, const char *);
extern int _wait_r (struct _reent *, int *);
extern _ssize_t _write_r (struct _reent *, int, const void *, size_t);
extern int _gettimeofday_r (struct _reent *, struct timeval *tp, struct timezone *tzp);
# 104 "../../../../../ccdir/newlib/libc/stdio/mktemp.c" 2
static int
_gettemp(struct _reent *ptr , char *path , register int *doopen)
{
register char *start, *trv;
struct stat sbuf;
unsigned int pid;
pid = _getpid_r (ptr);
for (trv = path; *trv; ++trv)
continue;
while (*--trv == 'X')
{
*trv = (pid % 10) + '0';
pid /= 10;
}
for (start = trv + 1;; --trv)
{
if (trv <= path)
break;
if (*trv == '/')
{
*trv = '\0';
if (_stat_r (ptr, path, &sbuf))
return (0);
if (!(sbuf.st_mode & 0040000))
{
ptr->_errno = 20;
return (0);
}
*trv = '/';
break;
}
}
for (;;)
{
if (doopen)
{
if ((*doopen = _open_r (ptr, path, 0x0200 | 0x0800 | 2, 0600))
>= 0)
return 1;
if (ptr->_errno != 17)
return 0;
}
else if (_stat_r (ptr, path, &sbuf))
return (ptr->_errno == 2 ? 1 : 0);
for (trv = start;;)
{
if (!*trv)
return 0;
if (*trv == 'z')
*trv++ = 'a';
else
{
if (((_ctype_+1)[(unsigned)(*trv)]&04))
*trv = 'a';
else
++ * trv;
break;
}
}
}
}
int
_mkstemp_r(struct _reent *ptr , char *path)
{
int fd;
return (_gettemp (ptr, path, &fd) ? fd : -1);
}
char *
_mktemp_r(struct _reent *ptr , char *path)
{
return (_gettemp (ptr, path, (int *) ((void *)0)) ? path : (char *) ((void *)0));
}
int
mkstemp(char *path)
{
int fd;
return (_gettemp (_impure_ptr, path, &fd) ? fd : -1);
}
char *
mktemp(char *path)
{
return (_gettemp (_impure_ptr, path, (int *) ((void *)0)) ? path : (char *) ((void *)0));
}
--------------end of mktemp.i---------------------
More information about the Gcc-bugs
mailing list