[Bug c/50222] ICE with -O{1,2} -funswitch-loops -ftree-loop-distribution

franxisco1988+gcc at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Aug 29 02:50:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50222

--- Comment #1 from klondike <franxisco1988+gcc at gmail dot com> 2011-08-28 22:08:56 UTC ---
Just for the record I can reproduce this with vanilla gcc:
# LANG="C" gcc -O2 -funswitch-loops -ftree-loop-distribution -I. -I.. -I../..
nutenc.c -include libavutil/internal.h -I ../../ -c -save-temps -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.1/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/configure --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.1
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.1/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.1
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.1/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.1/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.1/include/g++-v4
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
--disable-fixed-point --without-ppl --without-cloog --enable-lto --enable-nls
--without-included-gettext --with-system-zlib --disable-werror
--enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp
--enable-libgomp
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.6.1/python
--enable-checking=release --disable-libgcj --enable-languages=c,c++
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/
--with-pkgversion='Gentoo 4.6.1-r1'
Thread model: posix
gcc version 4.6.1 (Gentoo 4.6.1-r1) 
COLLECT_GCC_OPTIONS='-O2' '-funswitch-loops' '-ftree-loop-distribution' '-I'
'.' '-I' '..' '-I' '../..' '-include' 'libavutil/internal.h' '-I' '../../' '-c'
'-save-temps' '-v' '-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.1/cc1 -E -quiet -v -I . -I .. -I
../.. -I ../../ -include libavutil/internal.h nutenc.c -mtune=generic
-march=x86-64 -funswitch-loops -ftree-loop-distribution -O2 -fpch-preprocess -o
nutenc.i
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.1/../../../../x86_64-pc-linux-gnu/include"
ignoring duplicate directory "../../"
#include "..." search starts here:
#include <...> search starts here:
 .
 ..
 ../..
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.1/include
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.1/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-O2' '-funswitch-loops' '-ftree-loop-distribution' '-I'
'.' '-I' '..' '-I' '../..' '-include' 'libavutil/internal.h' '-I' '../../' '-c'
'-save-temps' '-v' '-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.1/cc1 -fpreprocessed nutenc.i -quiet
-dumpbase nutenc.c -mtune=generic -march=x86-64 -auxbase nutenc -O2 -version
-funswitch-loops -ftree-loop-distribution -o nutenc.s
GNU C (Gentoo 4.6.1-r1) version 4.6.1 (x86_64-pc-linux-gnu)
        compiled by GNU C version 4.6.1, GMP version 5.0.2, MPFR version
3.0.1-p4, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (Gentoo 4.6.1-r1) version 4.6.1 (x86_64-pc-linux-gnu)
        compiled by GNU C version 4.6.1, GMP version 5.0.2, MPFR version
3.0.1-p4, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: ddaf27b7508d5ce8d54dc64b17e05c96
nutenc.c: In function 'write_header':
nutenc.c:580:12: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.

(gdb) bt
#0  0x000000000081fb8f in rename_use_op (bb=0x7ffff6794410) at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/tree-vect-loop-manip.c:55
#1  rename_variables_in_bb (bb=0x7ffff6794410) at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/tree-vect-loop-manip.c:95
#2  0x000000000081fbce in rename_variables_in_loop (loop=0x7ffff6750a18) at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/tree-vect-loop-manip.c:111
#3  0x000000000075f27a in copy_loop_before (loop=<value optimized out>,
stmts=<value optimized out>) at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/tree-loop-distribution.c:137
#4  generate_loops_for_partition (loop=<value optimized out>, stmts=<value
optimized out>) at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/tree-loop-distribution.c:171
#5  generate_code_for_partition (loop=<value optimized out>, stmts=<value
optimized out>) at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/tree-loop-distribution.c:395
#6  ldist_gen (loop=<value optimized out>, stmts=<value optimized out>) at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/tree-loop-distribution.c:1133
#7  distribute_loop (loop=<value optimized out>, stmts=<value optimized out>)
at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/tree-loop-distribution.c:1218
#8  distribute_loop (loop=<value optimized out>, stmts=<value optimized out>)
at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/tree-loop-distribution.c:1160
#9  0x000000000075f64f in tree_loop_distribution () at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/tree-loop-distribution.c:1274
#10 0x000000000069a4a9 in execute_one_pass (pass=0x108c6c0) at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/passes.c:1556
#11 0x000000000069a755 in execute_pass_list (pass=0x108c6c0) at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/passes.c:1611
#12 0x000000000069a767 in execute_pass_list (pass=0x108d7a0) at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/passes.c:1612
#13 0x000000000069a767 in execute_pass_list (pass=0x108ca20) at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/passes.c:1612
#14 0x00000000007666c1 in tree_rest_of_compilation (fndecl=0x7ffff6b76b00) at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/tree-optimize.c:422
#15 0x00000000008a624f in cgraph_expand_function (node=0x7ffff6b7ac60) at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/cgraphunit.c:1576
#16 0x00000000008a7eaa in cgraph_expand_all_functions () at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/cgraphunit.c:1635
#17 cgraph_optimize () at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/cgraphunit.c:1899
#18 0x00000000008a82aa in cgraph_finalize_compilation_unit () at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/cgraphunit.c:1096
#19 0x00000000004b2665 in c_write_global_declarations () at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/c-decl.c:9871
#20 0x000000000072b4b8 in compile_file (argc=25, argv=0x7fffffffcc08) at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/toplev.c:591
#21 do_compile (argc=25, argv=0x7fffffffcc08) at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/toplev.c:1900
#22 toplev_main (argc=25, argv=0x7fffffffcc08) at
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/gcc/toplev.c:1963
#23 0x00007ffff6f74d6d in __libc_start_main () from /lib64/libc.so.6
#24 0x00000000004a2049 in _start ()



More information about the Gcc-bugs mailing list