[Bug target/82385] New: ICE in extract_constraint_insn, at recog.c:2213
vvulpes0 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Oct 1 22:41:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82385
Bug ID: 82385
Summary: ICE in extract_constraint_insn, at recog.c:2213
Product: gcc
Version: 7.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: vvulpes0 at gmail dot com
Target Milestone: ---
Target: m68k-elf
Created attachment 42271
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42271&action=edit
test.c
A combination of -mpcrel and any -O switch causes an internal compiler error in
$ m68k-elf-gcc -march=isaa -mpcrel -O -c test.c
The error appears for all and only the ColdFire architectures; plain 680x0 and
cpu32 compile fine. The error reported is:
test.c: In function 'f':
test.c:5:1: error: insn does not satisfy its constraints:
}
^
(insn 7 20 8 2 (set (reg:SI 0 %d0 [36])
(and:SI (reg:SI 0 %d0 [36])
(mem/c:SI (symbol_ref:SI ("b") <var_decl 0x7f609df03480 b>) [1 b+0
S4 A16]))) "test.c":3 230 {andsi3_5200}
(nil))
test.c:5:1: internal compiler error: in extract_constrain_insn, at recog.c:2213
Using this command to turn on nearly every -f* optimization:
$ m68k-elf-gcc -march=isaa -mpcrel \
$(m68k-elf-gcc -c -Q --help=optimizers,^joined \
| awk '/ *-f/ { print $1 }') -c test.c
succeeds, creating a test.o output file. On the other hand, using "-O" and
turning all of these options off with:
$ m68k-elf-gcc -march=isaa -mpcrel -O \
$(m68k-elf-gcc -c -Q --help=optimizers,^joined \
| awk '/ *-f/ && !/stack-protector/ {
sub("^-f","-fno",$1);
sub("-fno-no-","-f");
print $1
}') -c test.c
fails, producing the same error message as previosly shown.
Verbose version information:
$ m68k-elf-gcc -v -march=isaa -O -mpcrel -c test.c
Using built-in specs.
COLLECT_GCC=m68k-elf-gcc
Target: m68k-elf
Configured with: /home/fox/Builds/m68k-elf-gcc/src/gcc-7.2.0/configure
--target=m68k-elf --prefix=/opt/toolchains/m68k --with-cpu=68000
--with-arch=m68k --with-sysroot=/opt/toolchains/m68k
--with-native-system-header-dir=/include --enable-multilib
--enable-target-optspace --enable-languages=c,c++ --disable-decimal-float
--disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath
--disable-libsp --disable-libstdcxx-pch --disable-nls --disable-shared
--disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-system-zlib
--with-newlib --with-headers=/opt/toolchains/m68k/include
--with-python-dir=share/gcc-m68k-elf --with-gmp --with-mpfr --with-mpc
--with-isl --with-libelf --enable-gnu-indirect-function
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm'
--enable-checking=release
Thread model: single
gcc version 7.2.0 (GCC)
COLLECT_GCC_OPTIONS='-v' '-march=isaa' '-O' '-mpcrel' '-c'
/opt/toolchains/m68k/libexec/gcc/m68k-elf/7.2.0/cc1 -quiet -v test.c -quiet
-dumpbase test.c -march=isaa -mpcrel -auxbase test -O -version -o
/tmp/ccM0RTJ2.s
GNU C11 (GCC) version 7.2.0 (m68k-elf)
compiled by GNU C version 7.2.0, GMP version 6.1.2, MPFR version
3.1.5-p2, MPC version 1.0.3, isl version isl-0.18-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/opt/toolchains/m68k/usr/local/include"
ignoring nonexistent directory "/opt/toolchains/m68k/include"
#include "..." search starts here:
#include <...> search starts here:
/opt/toolchains/m68k/lib/gcc/m68k-elf/7.2.0/include
/opt/toolchains/m68k/lib/gcc/m68k-elf/7.2.0/include-fixed
/opt/toolchains/m68k/lib/gcc/m68k-elf/7.2.0/../../../../m68k-elf/include
End of search list.
GNU C11 (GCC) version 7.2.0 (m68k-elf)
compiled by GNU C version 7.2.0, GMP version 6.1.2, MPFR version
3.1.5-p2, MPC version 1.0.3, isl version isl-0.18-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 46dabb81a36eef283e59c52a07bd40c1
followed by the previously-shown error message.
More information about the Gcc-bugs
mailing list