[Bug middle-end/114855] ICE: Segfault when compiling large autogenerated C source file

2024-09-24 Thread jeremy.rutman at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114855

--- Comment #46 from jeremy rutman  ---
I don't know if this is relevant but a certain gcc I was using lately seems to
do fine compiling one of the autogenerated files in question (an AES128 encrypt
file) , but quits unexpectedly when I try compiling a second (the corresponding
AES128 decrypt)  

version: 
gcc.exe (x86_64-win32-sjlj-rev0, Built by MinGW-W64 project) 5.1.0
Copyright (C) 2015 Free Software Foundation, Inc.


$ C\:/Program\ Files/ANSYS\ Inc/v241/SCADE/contrib/Msys64/mingw64/bin/gcc.exe
-v -pedantic -Wall -Wextra -Wwrite-strings -g3 -I"C:\Program Files\ANSYS
Inc\v241\SCADE\SCADE\.\libraries\SC65\libmathext" -I"..\cryptol_aes"
-I"..\cryptol_aes\dec" -I"..\cryptol_aes\enc" -I"." -I"C:\Program Files\ANSYS
Inc\v241\SCADE\SCADE\." -I"C:\Program Files\ANSYS
Inc\v241\SCADE\SCADE\.\include" -I"C:\Program Files\ANSYS
Inc\v241\SCADE\SCADE\.\include\C" -I"C:\Program Files\ANSYS
Inc\v241\SCADE\SCADE\.\include\Ada" -I"C:\Program Files\ANSYS
Inc\v241\SCADE\SCADE\.\lib\Ada" -pedantic -DBUILD_DLL -DSIM -DWIN32 -D_CONSOLE
-D_MBCS -c -ansi -std=c99 -m64 "..\cryptol_aes\dec\aesDecrypt.c" -o
"win64\aesDecrypt.o"
Using built-in specs.
COLLECT_GCC=C:\Program Files\ANSYS
Inc\v241\SCADE\contrib\Msys64\mingw64\bin\gcc.exe
Target: x86_64-w64-mingw32
Configured with: ../../../src/gcc-5.1.0/configure --host=x86_64-w64-mingw32
--build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64
--with-sysroot=/c/mingw510/x86_64-510-win32-sjlj-rt_v4-rev0/mingw64
--with-gxx-include-dir=/mingw64/x86_64-w64-mingw32/include/c++ --enable-shared
--enable-static --enable-targets=all --enable-multilib
--enable-languages=ada,c,c++,fortran,objc,obj-c++,lto
--enable-libstdcxx-time=yes --enable-threads=win32 --enable-libgomp
--enable-libatomic --enable-lto --enable-graphite --enable-checking=release
--enable-fully-dynamic-string --enable-version-specific-runtime-libs
--enable-sjlj-exceptions --disable-isl-version-check --disable-libstdcxx-pch
--disable-libstdcxx-debug --enable-bootstrap --disable-rpath
--disable-win32-registry --disable-nls --disable-werror --disable-symvers
--with-gnu-as --with-gnu-ld --with-arch-32=i686 --with-arch-64=nocona
--with-tune-32=generic --with-tune-64=core2 --with-libiconv --with-system-zlib
--with-gmp=/c/mingw510/prerequisites/x86_64-w64-mingw32-static
--with-mpfr=/c/mingw510/prerequisites/x86_64-w64-mingw32-static
--with-mpc=/c/mingw510/prerequisites/x86_64-w64-mingw32-static
--with-isl=/c/mingw510/prerequisites/x86_64-w64-mingw32-static
--with-pkgversion='x86_64-win32-sjlj-rev0, Built by MinGW-W64 project'
--with-bugurl=http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe
-I/c/mingw510/x86_64-510-win32-sjlj-rt_v4-rev0/mingw64/opt/include
-I/c/mingw510/prerequisites/x86_64-zlib-static/include
-I/c/mingw510/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2
-pipe -I/c/mingw510/x86_64-510-win32-sjlj-rt_v4-rev0/mingw64/opt/include
-I/c/mingw510/prerequisites/x86_64-zlib-static/include
-I/c/mingw510/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=
LDFLAGS='-pipe -L/c/mingw510/x86_64-510-win32-sjlj-rt_v4-rev0/mingw64/opt/lib
-L/c/mingw510/prerequisites/x86_64-zlib-static/lib
-L/c/mingw510/prerequisites/x86_64-w64-mingw32-static/lib '
Thread model: win32
gcc version 5.1.0 (x86_64-win32-sjlj-rev0, Built by MinGW-W64 project)
COLLECT_GCC_OPTIONS='-v' '-Wall' '-Wextra' '-Wwrite-strings' '-g3' '-I'
'C:\Program Files\ANSYS Inc\v241\SCADE\SCADE\.\libraries\SC65\libmathext' '-I'
'..\cryptol_aes' '-I' '..\cryptol_aes\dec' '-I' '..\cryptol_aes\enc' '-I' '.'
'-I' 'C:\Program Files\ANSYS Inc\v241\SCADE\SCADE\.' '-I' 'C:\Program
Files\ANSYS Inc\v241\SCADE\SCADE\.\include' '-I' 'C:\Program Files\ANSYS
Inc\v241\SCADE\SCADE\.\include\C' '-I' 'C:\Program Files\ANSYS
Inc\v241\SCADE\SCADE\.\include\Ada' '-I' 'C:\Program Files\ANSYS
Inc\v241\SCADE\SCADE\.\lib\Ada' '-Wpedantic' '-D' 'BUILD_DLL' '-D' 'SIM' '-D'
'WIN32' '-D' '_CONSOLE' '-D' '_MBCS' '-c' '-ansi' '-std=c99' '-m64' '-o'
'win64\aesDecrypt.o' '-mtune=core2' '-march=nocona'
 C:/Program Files/ANSYS
Inc/v241/SCADE/contrib/Msys64/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/5.1.0/cc1.exe
-quiet -v -I C:\Program Files\ANSYS
Inc\v241\SCADE\SCADE\.\libraries\SC65\libmathext -I ..\cryptol_aes -I
..\cryptol_aes\dec -I ..\cryptol_aes\enc -I . -I C:\Program Files\ANSYS
Inc\v241\SCADE\SCADE\. -I C:\Program Files\ANSYS Inc\v241\SCADE\SCADE\.\include
-I C:\Program Files\ANSYS Inc\v241\SCADE\SCADE\.\include\C -I C:\Program
Files\ANSYS Inc\v241\SCADE\SCADE\.\include\Ada -I C:\Program Files\ANSYS
Inc\v241\SCADE\SCADE\.\lib\Ada -iprefix C:/Program Files/ANSYS
Inc/v241/SCADE/contrib/Msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/
-dD -U_REENTRANT -D BUILD_DLL -D SIM -D WIN32 -D _CONSOLE -D _MBCS
..\cryptol_aes\dec\aesDecrypt.c -quiet -dumpbase aesDecrypt.c -m64 -mtune=core2
-march=nocona -auxbase-strip win64\aesDecrypt.o -g3 -Wall -Wextra
-Wwrite-strings -Wpedantic -ansi -std=c99 -version -o
C:

[Bug middle-end/114855] ICE: Segfault

2024-04-26 Thread jeremy.rutman at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114855

--- Comment #5 from jeremy rutman  ---
Using gcc 14.0.1 20240117 (experimental) [master r14-8187-gb00be6f1576] I was
able to compile when not using any flags:

$ /usr/lib/gcc-snapshot/bin/cc -c aesDecrypt.c -o aesDecrypt.o

But when using the flags as before 

$  /usr/lib/gcc-snapshot/bin/cc -Wall -O3 -DNDEBUG -fomit-frame-pointer -c
aesDecrypt.c -o aesDecrypt.o

the compile kept going for at least one hour on my machine before I aborted.

[Bug middle-end/114855] ICE: Segfault

2024-04-25 Thread jeremy.rutman at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114855

--- Comment #3 from jeremy rutman  ---
For what it's worth, clang is able to compile the code in question. 

Ubuntu clang version 18.1.3 (1)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

[Bug c/114855] New: ICE: Segfault

2024-04-25 Thread jeremy.rutman at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114855

Bug ID: 114855
   Summary: ICE: Segfault
   Product: gcc
   Version: 13.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jeremy.rutman at gmail dot com
  Target Milestone: ---

Created attachment 58041
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58041&action=edit
output from  gcc -v

Attempt to compile some autogenerated code resulted in `cc: internal compiler
error: Segmentation fault signal terminated program cc1` . Compile command was 

gcc -v -Wall -O3 -DNDEBUG -fomit-frame-pointer -freport-bug -save-temps -c
aesDecrypt.c -o aesDecrypt.o

I put the offending source file 
aesDecrypt.c
here:
https://paste.c-net.org/ExamineLarch
and the .i file from the -save-temps 
aesDecrypt.i 
here
https://paste.c-net.org/TiredInduce
I'm not sure what the -freport-bug is doing but I used it in the compile
command anyway.  Apologies for the unwieldy size of the autogenerated code
being compiled.