[Bug c/90627] New: : internal compiler error when compiling cython-generated python3 modules
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90627 Bug ID: 90627 Summary: : internal compiler error when compiling cython-generated python3 modules Product: gcc Version: 9.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: bogi788 at hotmail dot com Target Milestone: --- Created attachment 46411 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46411&action=edit sample source file that causes the internal compiler error compiling any cython-generated python3 extension causes an internal compiler error using gcc 9.1.0 (on CentOS 7.6 x86_64). the output for one of the failing modules, compiled with gcc -v -save-temps -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fdata-sections -fdata-sections -flto -march=native -s -fPIC -I/opt/include/python3.7m -c _time.c -o _time.o -g0 is as follows: Using built-in specs. COLLECT_GCC=gcc Target: x86_64-pc-linux-gnu Configured with: /opt/src/gcc-9.1.0/configure --prefix=/opt --disable-multilib --enable-languages=c,c++,lto --with-arch=native --with-system-zlib Thread model: posix gcc version 9.1.0 (GCC) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-pthread' '-Wno-unused-result' '-Wsign-compare' '-D' 'NDEBUG' '-g' '-fwrapv' '-O3' '-Wall' '-fdata-sections' '-flto' '-march=native' '-s' '-fPIC' '-I' '/opt/include/python3.7m' '-c' '-o' '_time.o' '-g0' /opt/libexec/gcc/x86_64-pc-linux-gnu/9.1.0/cc1 -E -quiet -v -I /opt/plone-5.2/include -I /opt/include/python3.7m -D_REENTRANT -D NDEBUG _time.c -march=x86-64 -mmmx -mno-3dnow -msse -msse2 -msse3 -mno-ssse3 -mno-sse4a -mcx16 -msahf -mno-movbe -mno-aes -mno-sha -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-sgx -mno-bmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=generic -Wno-unused-result -Wsign-compare -Wall -fwrapv -fdata-sections -flto -fPIC -O3 -fpch-preprocess -o _time.i ignoring nonexistent directory "/opt/lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /opt/plone-5.2/include /opt/include/python3.7m /opt/lib/gcc/x86_64-pc-linux-gnu/9.1.0/include /usr/local/include /opt/include /opt/lib/gcc/x86_64-pc-linux-gnu/9.1.0/include-fixed /usr/include End of search list. : internal compiler error: in build_common_tree_nodes, at tree.c:10521 The resulting _time.i file contains only # 1 "ti/cache/_time.c" It should however be possible to compile the attached .c file with only the python 3.7 headers. Compiling the same source file using gcc 8.3 doesn't cause the internal compiler error. If it helps I can send the .i file generated by gcc 8.3.
[Bug target/90627] : internal compiler error when compiling cython-generated python3 modules
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90627 --- Comment #2 from bogi788 at hotmail dot com --- Created attachment 46414 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46414&action=edit gcc 8.3.0 preprocessed source The .i file was generated using gcc 8.3.0, since (as mentioned in the bugreport) gcc 9.1.0 writes an almost empty file.
[Bug target/90627] : internal compiler error when compiling cython-generated python3 modules
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90627 --- Comment #3 from bogi788 at hotmail dot com --- Created attachment 46415 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46415&action=edit gcc 9.1.0 preprocessed source the same file preprocessed with gcc 9.1.0, though i doubt it'll be much help.
[Bug target/90627] : internal compiler error when compiling cython-generated python3 modules
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90627 --- Comment #5 from bogi788 at hotmail dot com --- (In reply to Martin Liška from comment #4) > (In reply to bogi788 from comment #2) > > Created attachment 46414 [details] > > gcc 8.3.0 preprocessed source > > > > The .i file was generated using gcc 8.3.0, since (as mentioned in the > > bugreport) gcc 9.1.0 writes an almost empty file. > > Do you see the ICE if you use 8.3.0 generated file? Can you please provide > output of --verbose? gcc 8.3.0 compiles the source file without error, but gcc 9.1.0 still results in the internal compiler error using gcc 8.3.0's .i file with following output: Using built-in specs. COLLECT_GCC=gcc Target: x86_64-pc-linux-gnu Configured with: /opt/src/gcc-9.1.0/configure --prefix=/opt --disable-multilib --enable-languages=c,c++,lto --with-arch=native --with-system-zlib Thread model: posix gcc version 9.1.0 (GCC) COLLECT_GCC_OPTIONS='-v' '-pthread' '-Wno-unused-result' '-Wsign-compare' '-D' 'NDEBUG' '-g' '-fwrapv' '-O3' '-Wall' '-fdata-sections' '-flto' '-march=native' '-s' '-fPIC' '-c' '-o' 'build/temp.linux-x86_64-3.7/ti/cache/_time.o' '-g0' /opt/libexec/gcc/x86_64-pc-linux-gnu/9.1.0/cc1 -fpreprocessed _time.i -march=x86-64 -mmmx -mno-3dnow -msse -msse2 -msse3 -mno-ssse3 -mno-sse4a -mcx16 -msahf -mno-movbe -mno-aes -mno-sha -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-sgx -mno-bmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=generic -quiet -dumpbase _time.i -auxbase-strip build/temp.linux-x86_64-3.7/ti/cache/_time.o -g -g0 -O3 -Wno-unused-result -Wsign-compare -Wall -version -fwrapv -fdata-sections -flto -fPIC -o /tmp/cchXskmr.s GNU C17 (GCC) version 9.1.0 (x86_64-pc-linux-gnu) compiled by GNU C version 9.1.0, GMP version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.21-GMP GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU C17 (GCC) version 9.1.0 (x86_64-pc-linux-gnu) compiled by GNU C version 9.1.0, GMP version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.21-GMP GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 : internal compiler error: in build_common_tree_nodes, at tree.c:10521
[Bug target/90627] : internal compiler error when compiling cython-generated python3 modules
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90627 --- Comment #8 from bogi788 at hotmail dot com --- (In reply to Martin Liška from comment #6) > Sorry, I can't reproduce that. Maybe you could test a vanilla GCC built from > source files? This was on gcc 9.1 compiled from source on rhel7. I can't provide a docker image, but I can try compiling gcc on an Arch Linux box.
[Bug target/90627] : internal compiler error when compiling cython-generated python3 modules
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90627 --- Comment #10 from bogi788 at hotmail dot com --- (In reply to bogi788 from comment #8) > (In reply to Martin Liška from comment #6) > > Sorry, I can't reproduce that. Maybe you could test a vanilla GCC built from > > source files? > > This was on gcc 9.1 compiled from source on rhel7. I can't provide a docker > image, but I can try compiling gcc on an Arch Linux box. gcc 9.1.0 built from the same sources (using the same flags) on arch linux instead of rhel7 compiles the .c file without internal compiler error.
[Bug target/90627] : internal compiler error when compiling cython-generated python3 modules
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90627 --- Comment #11 from bogi788 at hotmail dot com --- (In reply to Martin Liška from comment #6) > Sorry, I can't reproduce that. Maybe you could test a vanilla GCC built from > source files? I tried again in a new rhel7 vm, going straight from distibution gcc (4.8.5) to 9.1 rather than upgrading from gcc 8.3. That resulted in a gcc 9.1 that didn't cause an internal compiler error, but since I used the 3 stage build in both cases I'm not sure how that might have caused the problem.