ish icon indicating copy to clipboard operation
ish copied to clipboard

gcc: illegal instruction rcr

Open fisherro opened this issue 8 years ago • 5 comments

With the latest build (32), I can now succeed at a git clone from github. I cloned chibi-scheme:

https://github.com/ashinn/chibi-scheme.git

But make fails with an internal compiler error. (The format warning seems legitimate, but I haven’t run into this internal compiler error on other platforms.)

~/github/chibi-scheme# make
echo '#define sexp_so_extension "'.so'"' > include/chibi/install.h
echo '#define sexp_default_module_path "'/usr/local/share/chibi:/usr/local/lib/chibi'"' >> include/chibi/install.h
echo '#define sexp_platform "'unix'"' >> include/chibi/install.h
echo '#define sexp_version "'0.8.0'"' >> include/chibi/install.h
echo '#define sexp_release_name "'cat RELEASE'"' >> include/chibi/install.h
cc -c -DSEXP_USE_NTPGETTIME -DSEXP_USE_INTTYPES -Iinclude -Wall -g -g3 -O3 -o main.o main.c
cc -c -DSEXP_USE_NTPGETTIME -DSEXP_USE_INTTYPES -Iinclude -Wall -g -g3 -O3 -fPIC -o gc.o gc.c
cc -c -DSEXP_USE_NTPGETTIME -DSEXP_USE_INTTYPES -Iinclude -Wall -g -g3 -O3 -fPIC -o sexp.o sexp.c
sexp.c: In function 'sexp_write_one':
sexp.c:2126:36: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Wformat=]
snprintf(numbuf, NUMBUF_LEN, "%" SEXP_PRIdFIXNUM, (long)sexp_unbox_fixnum(obj));
^
sexp.c: In function 'sexp_read_float_tail':
sexp.c:2514:5: internal compiler error: Illegal instruction
val = fabsl(e) > 320 ? exp(log(val) + e*M_LN10) : val * pow(10, e);
^~~
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.
make: *** [Makefile:140: sexp.o] Error 1

fisherro avatar Nov 26 '18 00:11 fisherro

What do you get if you type dmesg after trying to build? There should be a line with more information about the illegal instruction.

tbodt avatar Nov 26 '18 01:11 tbodt

Here it is:

15 illegal instruction at 0xf7cfad16: d1 da 89 1f 8d 76 fc 8d

fisherro avatar Nov 26 '18 23:11 fisherro

That's rcr which could be a pretty painful instruction to implement.

tbodt avatar Nov 26 '18 23:11 tbodt

I managed to minimize the given test case to this program:

3e-16;

tbodt avatar Dec 20 '18 02:12 tbodt

it work

tbodt avatar Dec 21 '18 02:12 tbodt