This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/63478] New: internal compiler error: in sparc_emit_set_const64, at config/sparc/sparc.c:2061
- From: "dev at cor0 dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 08 Oct 2014 03:00:30 +0000
- Subject: [Bug c/63478] New: internal compiler error: in sparc_emit_set_const64, at config/sparc/sparc.c:2061
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63478
Bug ID: 63478
Summary: internal compiler error: in sparc_emit_set_const64, at
config/sparc/sparc.c:2061
Product: gcc
Version: 4.7.4
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: dev at cor0 dot com
Given the simplest possible test code :
$ cat -n hello.c
1 #include <stdio.h>
2
3 int
4 main(int argc, char *argv[])
5 {
6 printf ( "Hello World!\n" );
7 return (0);
8 }
We see ICE thus :
$ /opt/intermediate/gcc4/bin/gcc -v -save-temps -mcpu=v8 -mno-app-regs -m32
-mptr64 -g -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO -S -o
hello_sparcv8_gcc-4.7.4.s hello.c
Using built-in specs.
COLLECT_GCC=/opt/intermediate/gcc4/bin/gcc
Target: sparc64-sun-solaris2.10
Configured with: ../gcc-4.7.4/configure --build=sparc64-sun-solaris2.10
--prefix=/opt/intermediate/gcc4 --libdir=/opt/intermediate/gcc4/lib
--libexecdir=/opt/intermediate/gcc4/lib --without-gnu-as --without-gnu-ld
--with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/sparcv9/ld
--with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local
--disable-nls --enable-threads=posix --enable-shared --with-cpu=v9
--enable-bootstrap --enable-languages=ada,c,c++ --enable-stage1-languages=c
--with-pkgversion='genunix Tue Oct 7 02:05:39 GMT 2014'
Thread model: posix
gcc version 4.7.4 (genunix Tue Oct 7 02:05:39 GMT 2014)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-mcpu=v8' '-mno-app-regs' '-m32'
'-mptr64' '-g' '-D' '_POSIX_PTHREAD_SEMANTICS' '-D' '_LARGEFILE64_SOURCE' '-D'
'_TS_ERRNO' '-S' '-o' 'hello_sparcv8_gcc-4.7.4.s'
/opt/intermediate/gcc4/lib/gcc/sparc64-sun-solaris2.10/4.7.4/cc1 -E -quiet -v
-imultilib sparcv8plus -D__sparcv8 -D _POSIX_PTHREAD_SEMANTICS -D
_LARGEFILE64_SOURCE -D _TS_ERRNO hello.c -mptr32 -mno-stack-bias -mcpu=v8
-mno-app-regs -m32 -mptr64 -g -fworking-directory -fpch-preprocess -o hello.i
ignoring nonexistent directory
"/opt/intermediate/gcc4/lib/gcc/sparc64-sun-solaris2.10/4.7.4/../../../../sparc64-sun-solaris2.10/include"
#include "..." search starts here:
#include <...> search starts here:
/opt/intermediate/gcc4/lib/gcc/sparc64-sun-solaris2.10/4.7.4/include
/usr/local/include
/opt/intermediate/gcc4/include
/opt/intermediate/gcc4/lib/gcc/sparc64-sun-solaris2.10/4.7.4/include-fixed
/usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-mcpu=v8' '-mno-app-regs' '-m32'
'-mptr64' '-g' '-D' '_POSIX_PTHREAD_SEMANTICS' '-D' '_LARGEFILE64_SOURCE' '-D'
'_TS_ERRNO' '-S' '-o' 'hello_sparcv8_gcc-4.7.4.s'
/opt/intermediate/gcc4/lib/gcc/sparc64-sun-solaris2.10/4.7.4/cc1
-fpreprocessed hello.i -mptr32 -mno-stack-bias -quiet -dumpbase hello.c
-mcpu=v8 -mno-app-regs -m32 -mptr64 -auxbase-strip hello_sparcv8_gcc-4.7.4.s -g
-version -o hello_sparcv8_gcc-4.7.4.s
GNU C (genunix Tue Oct 7 02:05:39 GMT 2014) version 4.7.4
(sparc64-sun-solaris2.10)
compiled by GNU C version 4.7.4, GMP version 6.0.0, MPFR version 3.1.2,
MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (genunix Tue Oct 7 02:05:39 GMT 2014) version 4.7.4
(sparc64-sun-solaris2.10)
compiled by GNU C version 4.7.4, GMP version 6.0.0, MPFR version 3.1.2,
MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 6c00354b9ef0a393ae7d72f614661fa3
hello.c: In function 'main':
hello.c:6:12: internal compiler error: in sparc_emit_set_const64, at
config/sparc/sparc.c:2061
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
$
Full pre-processed source :
$ cat hello.i
# 1 "hello.c"
# 1 "/export/home/dclarke/pgm/hello//"
# 1 "<command-line>"
# 1 "hello.c"
# 1 "/usr/include/stdio.h" 1 3 4
# 19 "/usr/include/stdio.h" 3 4
#pragma ident "@(#)stdio.h 1.86 13/09/11 SMI"
# 1
"/opt/intermediate/gcc4/lib/gcc/sparc64-sun-solaris2.10/4.7.4/include-fixed/sys/feature_tests.h"
1 3 4
# 17
"/opt/intermediate/gcc4/lib/gcc/sparc64-sun-solaris2.10/4.7.4/include-fixed/sys/feature_tests.h"
3 4
#pragma ident "@(#)feature_tests.h 1.26 11/04/12 SMI"
# 1 "/usr/include/sys/ccompile.h" 1 3 4
# 9 "/usr/include/sys/ccompile.h" 3 4
#pragma ident "@(#)ccompile.h 1.2 04/11/08 SMI"
# 20
"/opt/intermediate/gcc4/lib/gcc/sparc64-sun-solaris2.10/4.7.4/include-fixed/sys/feature_tests.h"
2 3 4
# 1 "/usr/include/sys/isa_defs.h" 1 3 4
#pragma ident "@(#)isa_defs.h 1.30 11/03/31 SMI"
# 21
"/opt/intermediate/gcc4/lib/gcc/sparc64-sun-solaris2.10/4.7.4/include-fixed/sys/feature_tests.h"
2 3 4
# 22 "/usr/include/stdio.h" 2 3 4
# 66 "/usr/include/stdio.h" 3 4
# 1
"/opt/intermediate/gcc4/lib/gcc/sparc64-sun-solaris2.10/4.7.4/include-fixed/iso/stdio_iso.h"
1 3 4
# 41
"/opt/intermediate/gcc4/lib/gcc/sparc64-sun-solaris2.10/4.7.4/include-fixed/iso/stdio_iso.h"
3 4
#pragma ident "@(#)stdio_iso.h 1.8 05/08/16 SMI"
# 1 "/usr/include/sys/va_list.h" 1 3 4
# 16 "/usr/include/sys/va_list.h" 3 4
#pragma ident "@(#)va_list.h 1.15 04/11/19 SMI"
# 99 "/usr/include/sys/va_list.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
typedef __builtin_va_list __va_list;
# 45
"/opt/intermediate/gcc4/lib/gcc/sparc64-sun-solaris2.10/4.7.4/include-fixed/iso/stdio_iso.h"
2 3 4
# 1 "/usr/include/stdio_tag.h" 1 3 4
# 9 "/usr/include/stdio_tag.h" 3 4
#pragma ident "@(#)stdio_tag.h 1.4 04/09/28 SMI"
# 21 "/usr/include/stdio_tag.h" 3 4
typedef struct __FILE __FILE;
# 46
"/opt/intermediate/gcc4/lib/gcc/sparc64-sun-solaris2.10/4.7.4/include-fixed/iso/stdio_iso.h"
2 3 4
# 1 "/usr/include/stdio_impl.h" 1 3 4
# 9 "/usr/include/stdio_impl.h" 3 4
#pragma ident "@(#)stdio_impl.h 1.15 07/03/05 SMI"
# 29 "/usr/include/stdio_impl.h" 3 4
struct __FILE
{
int _cnt;
unsigned char *_ptr;
unsigned char *_base;
unsigned char _flag;
unsigned char _file;
unsigned __orientation:2;
unsigned __ionolock:1;
unsigned __seekable:1;
unsigned __extendedfd:1;
unsigned __xf_nocheck:1;
unsigned __filler:10;
};
# 47
"/opt/intermediate/gcc4/lib/gcc/sparc64-sun-solaris2.10/4.7.4/include-fixed/iso/stdio_iso.h"
2 3 4
# 67
"/opt/intermediate/gcc4/lib/gcc/sparc64-sun-solaris2.10/4.7.4/include-fixed/iso/stdio_iso.h"
3 4
typedef long long __longlong_t;
# 83
"/opt/intermediate/gcc4/lib/gcc/sparc64-sun-solaris2.10/4.7.4/include-fixed/iso/stdio_iso.h"
3 4
typedef __FILE FILE;
typedef unsigned int size_t;
typedef long fpos_t;
# 155
"/opt/intermediate/gcc4/lib/gcc/sparc64-sun-solaris2.10/4.7.4/include-fixed/iso/stdio_iso.h"
3 4
extern __FILE __iob[20];
# 198
"/opt/intermediate/gcc4/lib/gcc/sparc64-sun-solaris2.10/4.7.4/include-fixed/iso/stdio_iso.h"
3 4
extern int remove(const char *);
extern int rename(const char *, const char *);
extern FILE *tmpfile(void);
extern char *tmpnam(char *);
extern int fclose(FILE *);
extern int fflush(FILE *);
extern FILE *fopen(const char *, const char *);
extern FILE *freopen(const char *,
const char *, FILE *);
extern void setbuf(FILE *, char *);
extern int setvbuf(FILE *, char *, int,
size_t);
extern int fprintf(FILE *, const char *, ...);
extern int fscanf(FILE *, const char *, ...);
extern int printf(const char *, ...);
extern int scanf(const char *, ...);
extern int sprintf(char *, const char *, ...);
extern int sscanf(const char *,
const char *, ...);
extern int vfprintf(FILE *, const char *,
__va_list);
extern int vprintf(const char *, __va_list);
extern int vsprintf(char *, const char *,
__va_list);
extern int fgetc(FILE *);
extern char *fgets(char *, int, FILE *);
extern int fputc(int, FILE *);
extern int fputs(const char *, FILE *);
extern int getc(FILE *);
extern int putc(int, FILE *);
extern int getchar(void);
extern int putchar(int);
extern char *gets(char *);
extern int puts(const char *);
extern int ungetc(int, FILE *);
extern size_t fread(void *, size_t, size_t,
FILE *);
extern size_t fwrite(const void *, size_t, size_t,
FILE *);
extern int fgetpos(FILE *, fpos_t *);
extern int fsetpos(FILE *, const fpos_t *);
extern int fseek(FILE *, long, int);
extern long ftell(FILE *);
extern void rewind(FILE *);
extern void clearerr(FILE *);
extern int feof(FILE *);
extern int ferror(FILE *);
extern void perror(const char *);
extern int __filbuf(FILE *);
extern int __flsbuf(int, FILE *);
# 67 "/usr/include/stdio.h" 2 3 4
# 135 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/iso/stdio_c99.h" 1 3 4
# 20 "/usr/include/iso/stdio_c99.h" 3 4
#pragma ident "@(#)stdio_c99.h 1.2 04/03/29 SMI"
# 54 "/usr/include/iso/stdio_c99.h" 3 4
extern int vfscanf(FILE *, const char *, __va_list);
extern int vscanf(const char *, __va_list);
extern int vsscanf(const char *, const char *,
__va_list);
# 68 "/usr/include/iso/stdio_c99.h" 3 4
extern int snprintf(char *, size_t, const char *,
...);
extern int vsnprintf(char *, size_t, const char *,
__va_list);
# 136 "/usr/include/stdio.h" 2 3 4
# 145 "/usr/include/stdio.h" 3 4
typedef long off_t;
typedef __longlong_t off64_t;
# 163 "/usr/include/stdio.h" 3 4
typedef __longlong_t fpos64_t;
# 197 "/usr/include/stdio.h" 3 4
extern unsigned char _sibuf[], _sobuf[];
# 229 "/usr/include/stdio.h" 3 4
extern unsigned char *_bufendtab[];
extern FILE *_lastbuf;
# 253 "/usr/include/stdio.h" 3 4
extern char *tmpnam_r(char *);
extern void setbuffer(FILE *, char *, size_t);
extern int setlinebuf(FILE *);
extern int asprintf(char **, const char *, ...);
extern int vasprintf(char **, const char *, __va_list);
# 272 "/usr/include/stdio.h" 3 4
extern FILE *fdopen(int, const char *);
extern char *ctermid(char *);
extern int fileno(FILE *);
# 284 "/usr/include/stdio.h" 3 4
extern void flockfile(FILE *);
extern int ftrylockfile(FILE *);
extern void funlockfile(FILE *);
extern int getc_unlocked(FILE *);
extern int getchar_unlocked(void);
extern int putc_unlocked(int, FILE *);
extern int putchar_unlocked(int);
# 299 "/usr/include/stdio.h" 3 4
extern FILE *popen(const char *, const char *);
extern char *tempnam(const char *, const char *);
extern int pclose(FILE *);
extern int getsubopt(char **, char *const *, char **);
extern char *cuserid(char *);
extern int getopt(int, char *const *, const char *);
extern char *optarg;
extern int optind, opterr, optopt;
extern int getw(FILE *);
extern int putw(int, FILE *);
# 322 "/usr/include/stdio.h" 3 4
extern int fseeko(FILE *, off_t, int);
extern off_t ftello(FILE *);
# 332 "/usr/include/stdio.h" 3 4
extern FILE *fopen64(const char *, const char *);
extern FILE *freopen64(const char *, const char *, FILE *);
extern FILE *tmpfile64(void);
extern int fgetpos64(FILE *, fpos64_t *);
extern int fsetpos64(FILE *, const fpos64_t *);
extern int fseeko64(FILE *, off64_t, int);
extern off64_t ftello64(FILE *);
# 2 "hello.c" 2
int
main(int argc, char *argv[])
{
printf ( "Hello World!\n" );
return (0);
}
$
Therefore we see from gcc -v :
- the exact version of GCC;
- the system type;
- the options given when GCC was configured/built;
- the complete command line that triggers the bug;
- the compiler output (error messages, warnings, etc.); and
- the preprocessed file (*.i*) that triggers the bug,
generated by adding -save-temps to the complete
compilation command
$ /opt/intermediate/gcc4/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/opt/intermediate/gcc4/bin/gcc
COLLECT_LTO_WRAPPER=/opt/intermediate/gcc4/lib/gcc/sparc64-sun-solaris2.10/4.7.4/lto-wrapper
Target: sparc64-sun-solaris2.10
Configured with: ../gcc-4.7.4/configure --build=sparc64-sun-solaris2.10
--prefix=/opt/intermediate/gcc4 --libdir=/opt/intermediate/gcc4/lib
--libexecdir=/opt/intermediate/gcc4/lib --without-gnu-as --without-gnu-ld
--with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/sparcv9/ld
--with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local
--disable-nls --enable-threads=posix --enable-shared --with-cpu=v9
--enable-bootstrap --enable-languages=ada,c,c++ --enable-stage1-languages=c
--with-pkgversion='genunix Tue Oct 7 02:05:39 GMT 2014'
Thread model: posix
gcc version 4.7.4 (genunix Tue Oct 7 02:05:39 GMT 2014)
$
Test suite results for this compiler where thus :
https://gcc.gnu.org/ml/gcc-testresults/2014-10/msg00816.html
Let me know what else you need.