http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41159
--- Comment #17 from Uros Bizjak <ubizjak at gmail dot com> 2011-12-15 14:01:56 UTC --- (In reply to comment #16) > It's tedious to look at this without a testcase that triggers on native > x86_64. My usual simple crosses do not work with LTO as I need a target > assembler and linker. > > So - someone with access to an affected target please debug this. I have managed to trigger this bug on x86_64-linux-gnu cross to alpha-linux-gnu. Please follow these steps: 1) compile and install binutils for alpha-linux-gnu. 2) configure crosscompiler with: ~/gcc-svn/trunk/configure --target=alpha-linux-gnu --enable-languages=c 3) make (and wait until the compilation crashes) 4) Go into gcc/testsuite/gcc.dg/lto directory 5) ~/gcc-build-alpha/gcc/xgcc -B ~/gcc-build-alpha/gcc -O1 -flto -flto-partition=1to1 -fPIC -c -o c_lto_20090116_0.o 20090116_0.c 6) ~/gcc-build-alpha/gcc/lto1 c_lto_20090116_0.o In file included from :0:0: 20090116_0.c: In function ‘foo’: 20090116_0.c:6:5: internal compiler error: in insert_value_copy_on_edge, at tree-outof-ssa.c:242 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. lto-wrapper: /home/uros/gcc-build-alpha/gcc/xgcc returned 1 exit status collect2: error: lto-wrapper returned 1 exit status 7) gdb --args ~/gcc-build-alpha/gcc/lto1 c_lto_20090116_0.o (gdb) break fancy_abort Breakpoint 1 at 0xadc540: file /home/uros/gcc-svn/trunk/gcc/diagnostic.c, line 898. (gdb) r Starting program: /home/uros/gcc-build-alpha/gcc/lto1 -O0 c_lto_20090116_0.o warning: no loadable sections found in added symbol-file system-supplied DSO at 0x2aaaaaaab000 Reading object files: c_lto_20090116_0.o Reading the callgraph Merging declarations Reading summaries Reading function bodies: foo Performing interprocedural optimizations <whole-program>Assembling functions: foo Breakpoint 1, fancy_abort (file=0xb92430 "/home/uros/gcc-svn/trunk/gcc/tree-outof-ssa.c", line=242, function=0xb92920 "insert_value_copy_on_edge") at /home/uros/gcc-svn/trunk/gcc/diagnostic.c:898 898 { (gdb) bt #0 fancy_abort (file=0xb92430 "/home/uros/gcc-svn/trunk/gcc/tree-outof-ssa.c", line=242, function=0xb92920 "insert_value_copy_on_edge") at /home/uros/gcc-svn/trunk/gcc/diagnostic.c:898 #1 0x000000000081c3ab in insert_value_copy_on_edge (e=<value optimized out>, g=0xf94080) at /home/uros/gcc-svn/trunk/gcc/tree-outof-ssa.c:242 #2 eliminate_phi (e=<value optimized out>, g=0xf94080) at /home/uros/gcc-svn/trunk/gcc/tree-outof-ssa.c:705 #3 0x000000000081c7e2 in expand_phi_nodes (sa=<value optimized out>) at /home/uros/gcc-svn/trunk/gcc/tree-outof-ssa.c:867 #4 0x00000000004d73f4 in gimple_expand_cfg () at /home/uros/gcc-svn/trunk/gcc/cfgexpand.c:4518 #5 0x0000000000707459 in execute_one_pass (pass=0xeae160) at /home/uros/gcc-svn/trunk/gcc/passes.c:2079 #6 0x00000000007077c5 in execute_pass_list (pass=0xeae160) at /home/uros/gcc-svn/trunk/gcc/passes.c:2134 #7 0x00000000008191c8 in tree_rest_of_compilation (fndecl=0x2aaaae82d800) at /home/uros/gcc-svn/trunk/gcc/tree-optimize.c:421 #8 0x00000000004f51ba in cgraph_expand_function (node=0x2aaaae832000) at /home/uros/gcc-svn/trunk/gcc/cgraphunit.c:1818 #9 0x00000000004f8b6b in cgraph_output_in_order () at /home/uros/gcc-svn/trunk/gcc/cgraphunit.c:1983 #10 cgraph_optimize () at /home/uros/gcc-svn/trunk/gcc/cgraphunit.c:2193 #11 0x000000000047f4e9 in lto_main () at /home/uros/gcc-svn/trunk/gcc/lto/lto.c:2931 #12 0x00000000007a99ec in compile_file (argc=3, argv=0x7fffffffb8e8) at /home/uros/gcc-svn/trunk/gcc/toplev.c:557 #13 do_compile (argc=3, argv=0x7fffffffb8e8) at /home/uros/gcc-svn/trunk/gcc/toplev.c:1928 #14 toplev_main (argc=3, argv=0x7fffffffb8e8) at /home/uros/gcc-svn/trunk/gcc/toplev.c:2004 #15 0x0000003f90c1d994 in __libc_start_main () from /lib64/libc.so.6 #16 0x000000000045dee9 in _start () I will also attach c_lto_20090116_0.o.