[Bug lto/65995] New: LTO: ICE in add_symbol_to_partition_1 for debug build

daniel.f.starke at freenet dot de gcc-bugzilla@gcc.gnu.org
Sun May 3 18:27:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65995

            Bug ID: 65995
           Summary: LTO: ICE in add_symbol_to_partition_1 for debug build
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: daniel.f.starke at freenet dot de
  Target Milestone: ---

Using GCC 5.1.0 compiled as:
COLLECT_GCC=E:\msys\mingw64-64\bin\g++.exe
COLLECT_LTO_WRAPPER=e:/msys/mingw64-64/bin/../libexec/gcc/x86_64-w64-mingw32/5.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../src/gcc-5.1.0/configure --host=x86_64-w64-mingw32
--enable-languages=c,c++ --enable-seh-exceptions --disable-nls --disable-shared
--enable-static --enable-fully-dynamic-string --enable-lto --enable-plugins
--enable-libgomp --with-dwarf2 --disable-win32-registry
--enable-version-specific-runtime-libs --prefix=/mingw64-64
--with-sysroot=/mingw64-64 --target=x86_64-w64-mingw32 --enable-targets=all
--enable-checking=release --with-gmp=/usr/new-gcc/lib/gmp-5.0.5
--with-mpfr=/usr/new-gcc/lib/mpfr-2.4.2 --with-mpc=/usr/new-gcc/lib/mpc-0.9
--with-isl=/usr/new-gcc/lib/isl-0.12.2
--with-cloog=/usr/new-gcc/lib/cloog-0.18.1 --with-host-libstdcxx='-lstdc++
-lsupc++' --disable-cloog-version-check --enable-cloog-backend=isl
Thread model: win32
gcc version 5.1.0 (GCC)

produces an ICE at lto/lto-partition.c:211 for me when linking as:
g++ -static -Wl,--allow-multiple-definition -flto -Llib64 -L../libpcfxx/lib64
-o bin/pp.exe lib64/libpcfxx.a bin/pp.o bin/posix_main.o bin/data/pp/Script.o
bin/data/pp/Execution.o bin/data/pp/Variable.o -lpcfxx -lboost_program_options
-lboost_locale -lboost_filesystem -lboost_iostreams -lboost_date_time
-lboost_thread -lboost_regex -lboost_system -lpcf -lws2_32

The command line passed to lto1.exe is:
e:/msys/mingw64-64/lib/gcc/../../libexec/gcc/x86_64-w64-mingw32/5.1.0/lto1.exe
-quiet -dumpdir bin/ -dumpbase pp.exe.wpa -mstackrealign -mtune=core2
-march=core2 -municode -mtune=generic -march=x86-64 -auxbase pp -Og
-fexceptions -fmath-errno -fsigned-zeros -ftrapping-math -fno-trapv
-fno-strict-overflow -fno-openmp -fno-openacc
-fltrans-output-list=C:\Users\a\AppData\Local\Temp\ccx77s2N.ltrans.out -fwpa
@C:\Users\a\AppData\Local\Temp\ccZr8s2N

The backtrace is:
#0  add_symbol_to_partition_1 (part=0x1f6d6fb0, node=0x2ceed930) at
../../../src/gcc-5.1.0/gcc/lto/lto-partition.c:211
        added = false
        c = <value optimized out>
        ref = <value optimized out>
        node1 = 0x2cee1000
        __FUNCTION__ = "add_symbol_to_partition_1"
#1  0x000000000043462d in add_symbol_to_partition (part=0x1f6d6fb0,
node=0x2ceed930) at ../../../src/gcc-5.1.0/gcc/lto/lto-partition.c:264
        node1 = <value optimized out>
        __FUNCTION__ = "add_symbol_to_partition"
#2  0x0000000000434818 in add_references_to_partition (part=0x1f6d6fb0,
node=0x2ce82480) at ../../../src/gcc-5.1.0/gcc/lto/lto-partition.c:115
        i = 1
        ref = 0x2cfb6030
#3  0x0000000000434510 in add_symbol_to_partition_1 (part=0x1f6d6fb0,
node=0x2ce82480) at ../../../src/gcc-5.1.0/gcc/lto/lto-partition.c:196
        c = <value optimized out>
        ref = <value optimized out>
        node1 = <value optimized out>
        __FUNCTION__ = "add_symbol_to_partition_1"
#4  0x000000000043462d in add_symbol_to_partition (part=0x1f6d6fb0,
node=0x2ce82480) at ../../../src/gcc-5.1.0/gcc/lto/lto-partition.c:264
        node1 = <value optimized out>
        __FUNCTION__ = "add_symbol_to_partition"
#5  0x0000000000434818 in add_references_to_partition (part=0x1f6d6fb0,
node=0x2ce87620) at ../../../src/gcc-5.1.0/gcc/lto/lto-partition.c:115
        i = 0
        ref = 0x2cfabf80
#6  0x0000000000434510 in add_symbol_to_partition_1 (part=0x1f6d6fb0,
node=0x2ce87620) at ../../../src/gcc-5.1.0/gcc/lto/lto-partition.c:196
        c = <value optimized out>
        ref = <value optimized out>
        node1 = <value optimized out>
        __FUNCTION__ = "add_symbol_to_partition_1"
#7  0x00000000004344a6 in add_symbol_to_partition_1 (part=0x1f6d6fb0,
node=0x2ce877a8) at ../../../src/gcc-5.1.0/gcc/lto/lto-partition.c:181
        e = 0x2cf5b750
        c = <value optimized out>
        ref = <value optimized out>
        node1 = <value optimized out>
        __FUNCTION__ = "add_symbol_to_partition_1"
#8  0x00000000004344a6 in add_symbol_to_partition_1 (part=0x1f6d6fb0,
node=0x2ce87930) at ../../../src/gcc-5.1.0/gcc/lto/lto-partition.c:181
        e = 0x2cf5b7b8
        c = <value optimized out>
        ref = <value optimized out>
        node1 = <value optimized out>
        __FUNCTION__ = "add_symbol_to_partition_1"
#9  0x00000000004344a6 in add_symbol_to_partition_1 (part=0x1f6d6fb0,
node=0x2ce87ab8) at ../../../src/gcc-5.1.0/gcc/lto/lto-partition.c:181
        e = 0x2cf5b820
        c = <value optimized out>
        ref = <value optimized out>
        node1 = <value optimized out>
        __FUNCTION__ = "add_symbol_to_partition_1"
#10 0x00000000004344a6 in add_symbol_to_partition_1 (part=0x1f6d6fb0,
node=0x2cedc620) at ../../../src/gcc-5.1.0/gcc/lto/lto-partition.c:181
        e = 0x2cf7ff08
        c = <value optimized out>
        ref = <value optimized out>
        node1 = <value optimized out>
        __FUNCTION__ = "add_symbol_to_partition_1"
#11 0x000000000043462d in add_symbol_to_partition (part=0x1f6d6fb0,
node=0x2cedc620) at ../../../src/gcc-5.1.0/gcc/lto/lto-partition.c:264
        node1 = <value optimized out>
        __FUNCTION__ = "add_symbol_to_partition"
#12 0x00000000004358d1 in lto_balanced_map (n_lto_partitions=32) at
../../../src/gcc-5.1.0/gcc/lto/lto-partition.c:550
        n_nodes = 3144
        n_varpool_nodes = 0
        varpool_pos = 0
        best_varpool_pos = 0
        order = 0x259ec9e0
        noreorder = {<vec<cgraph_node*, va_heap, vl_ptr>> = {m_vec = 0x0}, <No
data fields>}
        varpool_order = {<vec<varpool_node*, va_heap, vl_ptr>> = {m_vec = 0x0},
<No data fields>}
        i = 462
        node = <value optimized out>
        total_size = 164769
        best_total_size = 164769
        partition_size = 6021
        partition = 0x1f6d6fb0
        last_visited_node = 292
        vnode = <value optimized out>
        cost = 348476
        internal = 411946
        best_n_nodes = 292
        best_i = 461
        best_cost = 348476
        best_internal = 411946
        npartitions = 5
        current_order = 161698
        noreorder_pos = 0
        __FUNCTION__ = "lto_balanced_map"
        next_nodes = {<vec<symtab_node*, va_heap, vl_ptr>> = {m_vec = 0x0}, <No
data fields>}
#13 0x000000000042fd09 in do_whole_program_analysis () at
../../../src/gcc-5.1.0/gcc/lto/lto.c:3324
        node = <value optimized out>
        __FUNCTION__ = "do_whole_program_analysis"
#14 0x0000000000431b70 in lto_main () at
../../../src/gcc-5.1.0/gcc/lto/lto.c:3485
No locals.
#15 0x00000000007a45d2 in compile_file () at
../../../src/gcc-5.1.0/gcc/toplev.c:594
No locals.
#16 0x00000000007a6675 in do_compile () at
../../../src/gcc-5.1.0/gcc/toplev.c:2076
        i = <value optimized out>
#17 0x00000000007a686d in toplev::main (this=0x1d16fe30, argc=30,
argv=0x2fa730) at ../../../src/gcc-5.1.0/gcc/toplev.c:2174
No locals.
#18 0x0000000000ec0b66 in main (argc=26, argv=0x2e77f0) at
../../../src/gcc-5.1.0/gcc/main.c:39
        toplev = {m_use_TV_TOTAL = true, m_init_signals = true}

I do not know how to reproduce this bug with less code at the moment.
Furthermode, the source is not open thus I cannot post it here. But I can help
to debug this problem if someone can tell me where I should look at. May be
related to PR65380.



More information about the Gcc-bugs mailing list