[Bug middle-end/83286] internal compiler error: Illegal instruction

2023-02-17 Thread nightstrike at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83286

nightstrike  changed:

   What|Removed |Added

 CC||nightstrike at gmail dot com

--- Comment #9 from nightstrike  ---
I compiled both of the preprocessed source attachments and could not reproduce
your failure using a recently built gcc 13 cross compiler from linux to
x86_64-w64-mingw32.  I used no options, "-O3 -Wall -fno-strict-aliasing
-fomit-frame-pointer-funroll-loops -fPIC", and "-O3 -Wall
-fno-strict-aliasing" based on your command lines.

Is it safe to assume that this is no longer an issue?

[Bug middle-end/83286] internal compiler error: Illegal instruction

2017-12-08 Thread aweslowski at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83286

--- Comment #8 from Alex Weslowski  ---
(In reply to Richard Biener from comment #6)
> Illegal instruction is usually coming from gmp/mpfr which might be linked
> statically into your GCC binary on mingw.

This may indeed be the case. Also happens in GCC 7.2.0, which may indicate bug
in external program. GMP/MPFR/MSYS2/Windows/other. Pasted is a similar or same
error in 7.2.0. Attached the relevant preprocessed file to this bug (even
though this bug is marked 6.4.0).



Making gp in Omingw-x86_64
make[1]: Entering directory '/pari-2.9.3/Omingw-x86_64'
/mingw64/bin/gcc -v -save-temps -c -I. -I../src64/headers  -O3 -Wall
-fno-strict-aliasing-o trans3.o ../src64/basemath/trans3.c
Using built-in specs.
COLLECT_GCC=C:\MSYS64\mingw64\bin\gcc.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-7.2.0/configure --prefix=/mingw64
--with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32
--host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32
--with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include
--libexecdir=/mingw64/lib --enable-bootstrap --with-arch=x86-64
--with-tune=generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada
--enable-shared --enable-static --enable-libatomic --enable-threads=posix
--enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-time=yes
--disable-libstdcxx-pch --disable-libstdcxx-debug --disable-isl-version-check
--enable-lto --enable-libgomp --disable-multilib --enable-checking=release
--disable-rpath --disable-win32-registry --disable-nls --disable-werror
--disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64
--with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64
--with-pkgversion='Rev1, Built by MSYS2 project'
--with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as
--with-gnu-ld
Thread model: posix
gcc version 7.2.0 (Rev1, Built by MSYS2 project)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-I' '.' '-I' '../src64/headers'
'-O3' '-Wall' '-fno-strict-aliasing' '-o' 'trans3.o' '-mtune=generic'
'-march=x86-64'
 C:/MSYS64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/cc1.exe -E -quiet -v
-I . -I ../src64/headers -iprefix
C:/MSYS64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/ -D_REENTRANT
../src64/basemath/trans3.c -mtune=generic -march=x86-64 -Wall
-fno-strict-aliasing -O3 -fpch-preprocess -o trans3.i
ignoring duplicate directory
"C:/MSYS64/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.2.0/include"
ignoring nonexistent directory "C:/building/msys64/mingw64/include"
ignoring nonexistent directory "/mingw64/include"
ignoring duplicate directory
"C:/MSYS64/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.2.0/include-fixed"
ignoring duplicate directory
"C:/MSYS64/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/include"
ignoring nonexistent directory
"C:/building/msys64/mingw64/x86_64-w64-mingw32/include"
#include "..." search starts here:
#include <...> search starts here:
 .
 ../src64/headers
 C:/MSYS64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/include
 C:/MSYS64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../include
 C:/MSYS64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/include-fixed

C:/MSYS64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-I' '.' '-I' '../src64/headers'
'-O3' '-Wall' '-fno-strict-aliasing' '-o' 'trans3.o' '-mtune=generic'
'-march=x86-64'
 C:/MSYS64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/cc1.exe
-fpreprocessed trans3.i -quiet -dumpbase trans3.c -mtune=generic -march=x86-64
-auxbase-strip trans3.o -O3 -Wall -version -fno-strict-aliasing -o trans3.s
GNU C11 (Rev1, Built by MSYS2 project) version 7.2.0 (x86_64-w64-mingw32)
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
GNU C11 (Rev1, Built by MSYS2 project) version 7.2.0 (x86_64-w64-mingw32)
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: cd663256441e045689e54e69adf53c13
In file included from ../src64/headers/pari.h:49:0,
 from ../src64/basemath/trans3.c:20:
../src/kernel/none/level1.h: In function 'mpveceint1':
../src/kernel/none/level1.h:154:7: internal compiler error: Segmentation fault
   GEN z = new_chunk((size_t)x);
   ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[1]: *** [Makefile:1136: trans3.o] Error 1
make[1]: Leaving directory '/pari-2.9.3/Omingw-x86_64'
make: *** [Makefile:34: gp] Error 2

[Bug middle-end/83286] internal compiler error: Illegal instruction

2017-12-08 Thread aweslowski at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83286

--- Comment #7 from Alex Weslowski  ---
Created attachment 42819
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42819=edit
Preprocessed file trans3.i

[Bug middle-end/83286] internal compiler error: Illegal instruction

2017-12-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83286

Richard Biener  changed:

   What|Removed |Added

 Target||mingw64

--- Comment #6 from Richard Biener  ---
Illegal instruction is usually coming from gmp/mpfr which might be linked
statically into your GCC binary on mingw.

[Bug middle-end/83286] internal compiler error: Illegal instruction

2017-12-04 Thread aweslowski at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83286

--- Comment #5 from Alex Weslowski  ---

Please note, this appears to be fixed (hopefully) in GCC 7.2.0. Either that, or
my version of GCC 6.4.0 is borked. (Or, it may be an intermittent error, I
suppose.)

[Bug middle-end/83286] internal compiler error: Illegal instruction

2017-12-04 Thread aweslowski at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83286

--- Comment #4 from Alex Weslowski  ---

Verbose output:




Making gp in O6.1-none-msys_nt
make[1]: Entering directory 'pari-2.9.3/O6.1-none-msys_nt'
/usr/bin/gcc -v -save-temps -c -O3 -Wall -fno-strict-aliasing
-fomit-frame-pointer-funroll-loops -fPIC -I. -I../src/headers -o mpker.o
mpker.c
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
Target: x86_64-pc-msys
Configured with: /msys_scripts/gcc/src/gcc-6.4.0/configure
--build=x86_64-pc-msys --prefix=/usr --libexecdir=/usr/lib --enable-bootstrap
--enable-shared --enable-shared-libgcc --enable-static
--enable-version-specific-runtime-libs --with-arch=x86-64 --with-tune=generic
--disable-multilib --enable-__cxa_atexit --with-dwarf2
--enable-languages=c,c++,fortran,lto --enable-graphite --enable-threads=posix
--enable-libatomic --enable-libcilkrts --enable-libgomp --enable-libitm
--enable-libquadmath --enable-libquadmath-support --enable-libssp
--disable-win32-registry --disable-symvers --with-gnu-ld --with-gnu-as
--disable-isl-version-check --enable-checking=release --without-libiconv-prefix
--without-libintl-prefix --with-system-zlib --enable-linker-build-id
--with-default-libstdcxx-abi=gcc4-compatible
Thread model: posix
gcc version 6.4.0 (GCC)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-O3' '-Wall'
'-fno-strict-aliasing' '-fomit-frame-pointer' '-funroll-loops' '-fPIC' '-I' '.'
'-I' '../src/headers' '-o' 'mpker.o' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-pc-msys/6.4.0/cc1.exe -E -quiet -v -I . -I ../src/headers
-Dunix -idirafter /usr/lib/../lib/../include/w32api -idirafter
/usr/lib/gcc/x86_64-pc-msys/6.4.0/../../../../x86_64-pc-msys/lib/../lib/../../include/w32api
mpker.c -mtune=generic -march=x86-64 -Wall -fno-strict-aliasing
-fomit-frame-pointer -funroll-loops -fPIC -O3 -fpch-preprocess -o mpker.i
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-pc-msys/6.4.0/../../../../x86_64-pc-msys/include"
ignoring duplicate directory
"/usr/lib/gcc/x86_64-pc-msys/6.4.0/../../../../x86_64-pc-msys/lib/../lib/../../include/w32api"
#include "..." search starts here:
#include <...> search starts here:
 .
 ../src/headers
 /usr/lib/gcc/x86_64-pc-msys/6.4.0/include
 /usr/lib/gcc/x86_64-pc-msys/6.4.0/include-fixed
 /usr/include
 /usr/lib/../lib/../include/w32api
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-O3' '-Wall'
'-fno-strict-aliasing' '-fomit-frame-pointer' '-funroll-loops' '-fPIC' '-I' '.'
'-I' '../src/headers' '-o' 'mpker.o' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-pc-msys/6.4.0/cc1.exe -fpreprocessed mpker.i -quiet
-dumpbase mpker.c -mtune=generic -march=x86-64 -auxbase-strip mpker.o -O3 -Wall
-version -fno-strict-aliasing -fomit-frame-pointer -funroll-loops -fPIC -o
mpker.s
GNU C11 (GCC) version 6.4.0 (x86_64-pc-msys)
compiled by GNU C version 6.4.0, GMP version 6.1.2, MPFR version
3.1.5-p2, MPC version 1.0.3, isl version 0.15
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C11 (GCC) version 6.4.0 (x86_64-pc-msys)
compiled by GNU C version 6.4.0, GMP version 6.1.2, MPFR version
3.1.5-p2, MPC version 1.0.3, isl version 0.15
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 24bcd17f6cf5e28e81030c79700f6f57
In file included from ../src/headers/pari.h:49:0,
 from ../src/kernel/none/mp.c:20:
../src/kernel/none/divll_pre.h: In function ‘get_Fl_red’:
../src/kernel/none/divll_pre.h:31:1: internal compiler error: Illegal
instruction
 }
 ^
gcc: internal compiler error: Segmentation fault (program cc1)
make[1]: *** [Makefile:970: mpker.o] Error 4
make[1]: Leaving directory 'pari-2.9.3/O6.1-none-msys_nt'
make: *** [Makefile:34: gp] Error 2

[Bug middle-end/83286] internal compiler error: Illegal instruction

2017-12-04 Thread aweslowski at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83286

--- Comment #3 from Alex Weslowski  ---
Created attachment 42786
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42786=edit
Preprocessed file mpker.i

[Bug middle-end/83286] internal compiler error: Illegal instruction

2017-12-04 Thread aweslowski at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83286

--- Comment #2 from Alex Weslowski  ---
(In reply to Andrew Pinski from comment #1)
> Can you read https://gcc.gnu.org/bugs/ and provide the preprocessed source?

Hi, will attach the mpker.i file to this bug. The zip file has also been
updated. Check the O6.1-none-msys_nt directory, I think.

https://www.dropbox.com/s/b2maeinfc459x0o/pari-2.9.3.zip?dl=0

[Bug middle-end/83286] internal compiler error: Illegal instruction

2017-12-04 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83286

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2017-12-05
  Component|c   |middle-end
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
Can you read https://gcc.gnu.org/bugs/ and provide the preprocessed source?