[Bug c/78380] New: GCC crash with internal compiler error: in gen_reg_rtx, at emit-rtl.c:1025
elmar at yasara dot org
gcc-bugzilla@gcc.gnu.org
Wed Nov 16 13:19:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78380
Bug ID: 78380
Summary: GCC crash with internal compiler error: in
gen_reg_rtx, at emit-rtl.c:1025
Product: gcc
Version: 6.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: elmar at yasara dot org
Target Milestone: ---
Created attachment 40057
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40057&action=edit
Preprocessed source file
Dear GCC team,
I encountered this crash when compiling for MacOSX, either directly in MacOSX
(precompiled GCC 6.2.0 downloaded from hpc.sourceforge.net) or when
cross-compiling from Linux (GCC 6.2.0 compiled using
https://github.com/tpoechtrager/osxcross scripts)
The bug database found three possibly related bugs, but in emit-rtl.c line
1027, not line 1025 like mine:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70420
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69401
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68538
The preprocessed source is attached.
This is the complete command line:
/usr/local/bin/gcc -v -O0 -ffast-math -m32 -mfpmath=sse -ffast-math
-march=core-avx2 -mavx2 -Wall -Werror -x c -c crash.c -o crash.o
Using built-in specs.
COLLECT_GCC=/usr/local/bin/gcc
Target: x86_64-apple-darwin15.6.0
Configured with: ../gcc-6.2.0/configure --enable-languages=c++,fortran
--with-gmp=/usr/local
Thread model: posix
gcc version 6.2.0 (GCC)
COLLECT_GCC_OPTIONS='-O0' '-m32' '-mfpmath=sse' '-ffast-math'
'-march=core-avx2' '-mavx2' '-Wall' '-Werror' '-c' '-o' 'crash.o' '-v'
'-mmacosx-version-min=10.11.3'
/usr/local/libexec/gcc/x86_64-apple-darwin15.6.0/6.2.0/cc1 -quiet -v
-imultilib i386 -D__DYNAMIC__ crash.c -fPIC -quiet -dumpbase crash.c -m32
-mfpmath=sse -march=core-avx2 -mavx2 -mmacosx-version-min=10.11.3
-auxbase-strip crash.o -O0 -Wall -Werror -version -ffast-math -o
/var/folders/vx/qnr8bkmj1_l5cq70_9h578p80000gn/T//ccU4jeMd.s
GNU C11 (GCC) version 6.2.0 (x86_64-apple-darwin15.6.0)
compiled by GNU C version 6.2.0, GMP version 6.0.0, MPFR version
3.1.2-p10, MPC version 1.0.2, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
"/usr/local/lib/gcc/x86_64-apple-darwin15.6.0/6.2.0/../../../../x86_64-apple-darwin15.6.0/include"
ignoring nonexistent directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/lib/gcc/x86_64-apple-darwin15.6.0/6.2.0/include
/usr/local/include
/usr/local/lib/gcc/x86_64-apple-darwin15.6.0/6.2.0/include-fixed
/System/Library/Frameworks
/Library/Frameworks
End of search list.
GNU C11 (GCC) version 6.2.0 (x86_64-apple-darwin15.6.0)
compiled by GNU C version 6.2.0, GMP version 6.0.0, MPFR version
3.1.2-p10, MPC version 1.0.2, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 226fa07ddbd61344d84e06f1b58d4ece
/home/twinset/yasara/inout.c: In function ‘cl_measurebandwidth’:
/home/twinset/yasara/inout.c:2340:2: internal compiler error: in gen_reg_rtx,
at emit-rtl.c:1025
/home/twinset/yasara/inout.c:2340:2: internal compiler error: Abort trap: 6
gcc: internal compiler error: Abort trap: 6 (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
------------------------------------------
While fiddling with crash.c, I found that removing the 'exectime' from line
149493, i.e.
mbps=testsize/(1024.*1024.*1e-6);
yields a different error:
x86_64-apple-darwin9-as -arch i386 -force_cpusubtype_ALL -o crash.o
/tmp/ccQKjbFH.s
/tmp/ccQKjbFH.s:954:no such instruction: `shlx %eax, %edx,%eax'
/tmp/ccQKjbFH.s:1040:no such instruction: `vxorpd %xmm0, %xmm0,%xmm0'
/tmp/ccQKjbFH.s:1041:no such instruction: `vcvtsi2sd -36(%ebp), %xmm0,%xmm0'
/tmp/ccQKjbFH.s:1043:no such instruction: `vmovsd (%eax), %xmm1'
/tmp/ccQKjbFH.s:1044:no such instruction: `vdivsd %xmm1, %xmm0,%xmm0'
/tmp/ccQKjbFH.s:1045:no such instruction: `vcvttsd2si %xmm0, %eax'
which is strange, since these instructions exist in 32bit mode.
And BTW, I wonder why the preprocessor inserts myriads of useless line number
directives now, this did not happen in older GCC versions:
# 2268 "/home/twinset/yasara/inout.c" 3 4
# 2268 "/home/twinset/yasara/inout.c"
# 2268 "/home/twinset/yasara/inout.c" 3 4
# 2268 "/home/twinset/yasara/inout.c"
else testbuff=cl_CreateBuffer(context->id,0x40,testsize,
((void
*)0)
,
((void *)0)
); }
# 2269 "/home/twinset/yasara/inout.c" 3 4
# 2269 "/home/twinset/yasara/inout.c"
# 2269 "/home/twinset/yasara/inout.c" 3 4
# 2269 "/home/twinset/yasara/inout.c"
else testbuff=cl_CreateBuffer(context->id,0,testsize,
((void *)0)
,
((void *)0)
);
More information about the Gcc-bugs
mailing list