[Bug lto/58528] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478

2020-07-20 Thread charles.frasch at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528

--- Comment #11 from Charles  ---
This is a very old bug against a very old compiler. I no longer have access to
the code that triggered the issue. I would say to go ahead and close it. An
awful lot of changes have been made to lto since the ICE was reported.

[Bug lto/58528] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478

2020-07-16 Thread mark at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528

Mark Wielaard  changed:

   What|Removed |Added

 CC||mark at gcc dot gnu.org

--- Comment #10 from Mark Wielaard  ---
It isn't entirely clear to me how to replicate this.
Is this still an issue with newer gcc?

[Bug lto/58528] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478

2014-09-16 Thread npl at chello dot at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528

npl at chello dot at changed:

   What|Removed |Added

 CC||npl at chello dot at

--- Comment #9 from npl at chello dot at ---
I get this issue too, but cant provide sources. The program compiles if -g0 is
used. Happens with gcc 4.8.2 and gcc 4.8.3.

lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478
0x821c8c8 build_abbrev_table
/tmp/toolchain-make/build/gcc-4.8.2/gcc/dwarf2out.c:7478
0x821c733 build_abbrev_table
/tmp/toolchain-make/build/gcc-4.8.2/gcc/dwarf2out.c:7535
0x821e19b output_comp_unit
/tmp/toolchain-make/build/gcc-4.8.2/gcc/dwarf2out.c:8608
0x8237fa0 dwarf2out_finish
/tmp/toolchain-make/build/gcc-4.8.2/gcc/dwarf2out.c:23557

Target: arm-none-eabi
Configured with: /tmp/toolchain-make/build/gcc-4.8.2/configure
--prefix=/opt/imx28-48v1 --target=arm-none-eabi --enable-languages=c,c++
--disable-libstdcxx-verbose --disable-libmudflap --disable-libssp
--disable-libstdcxx-pch --enable-multilib --disable-shared --disable-nls
--with-system-zlib --enable-tls --with-gnu-as --with-gnu-ld --enable-lto
--with-newlib --with-gmp=/tmp/toolchain-make/build/ggcnativebuild/gmp-5.1.3
--with-mpfr=/tmp/toolchain-make/build/ggcnativebuild/mpfr-3.1.2
--with-mpc=/tmp/toolchain-make/build/ggcnativebuild/mpc-1.0.2
--with-cloog=/tmp/toolchain-make/build/ggcnativebuild/cloog-0.18.0
--with-isl=/tmp/toolchain-make/build/ggcnativebuild/isl-0.11.1
--with-host-libstdcxx='-Wl,-Bstatic,/usr/lib/gcc/i486-linux-gnu/4.7/libstdc++.a,/usr/lib/gcc/i486-linux-gnu/4.7/libsupc++.a,-Bdynamic
-lm'
Thread model: single
gcc version 4.8.2 (GCC)


[Bug lto/58528] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478

2014-05-30 Thread blade at debian dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528

Eduard Bloch  changed:

   What|Removed |Added

 CC||blade at debian dot org

--- Comment #8 from Eduard Bloch  ---
I have the same or at least very similar issue and it makes me crazy because it
seems to have something with the position of the -g flag. I.e. this option set
seems to work:
-pthread -g -O3 -Wall -Wextra -Wno-unused-parameter -D_FILE_OFFSET_BITS=64
-flto

but
-pthread -O3 -Wall -Wextra -Wno-unused-parameter -D_FILE_OFFSET_BITS=64 -g
-flto
does not! There also seems to be some kind of race: the first time I tried it
with g++-4.9, it was hanging for a while and then segfaulted, afterwards it's
now running into ICE (same behavior with version 4.8).

I made a build with -save-temps inside, see
https://www.unix-ag.uni-kl.de/~bloch/acng/tmp/ and I can provide source:

git clone https://alioth.debian.org/anonscm/git/apt-cacher-ng/apt-cacher-ng.git

Branch: upstream

Ref: 55661a69fcdc8263101a7849d3f9f83b8b05571b

Command: make -j5 CXXFLAGS="-g -flto" LDFLAGS=-flto apt-cacher-ng


[Bug lto/58528] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478

2014-04-28 Thread ostash at ostash dot kiev.ua
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528

Viktor Ostashevskyi  changed:

   What|Removed |Added

 CC||ostash at ostash dot kiev.ua

--- Comment #7 from Viktor Ostashevskyi  ---
I managed to trigger this bug too:

lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/atse_git/ostash/tc48/libexec/gcc/x86_64-pc-linux-gnu/4.8.3/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-4.8-20140313/configure --enable-bootstrap
--enable-checking=release --enable-clocale=gnu --enable-__cxa_atexit
--disable-fixed-point --enable-gnu-indirect-function --enable-gnu-unique-object
--enable-initfini-array --enable-languages=c,c++ --disable-libmudflap
--disable-libssp --disable-libstdcxx-pch --enable-libstdcxx-time
--disable-libquadmath --disable-libquadmath-support --enable-linux-futex
--enable-lto --disable-multiarch --disable-multilib --disable-nls
--enable-plugin --enable-secureplt --disable-sjlj-exceptions
--enable-threads=posix --enable-tls --with-build-config=bootstrap-lto
--with-gnu-as --with-gnu-ld --with-linker-hash-style=gnu --with-system-zlib
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu
Thread model: posix
gcc version 4.8.3 20140313 (prerelease) (GCC)

I can't provide sources unfortunately.


[Bug lto/58528] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478

2013-09-27 Thread charles.frasch at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528

--- Comment #6 from Charles  ---
Created attachment 30912
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30912&action=edit
script to reproduce the ICE

This script reproduces the bug. It requires 27 .ii files and one archive file
of Google's gtest 1.6.0. If this is acceptable will either attach the .ii files
or send you a tarball directly.


[Bug lto/58528] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478

2013-09-26 Thread charles.frasch at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528

--- Comment #5 from Charles  ---
I think I have "reduced" this as much as possible. Need separate compilations
for each .cpp file and the six archive libraries. Will try to make a script
that makes the ars from .ii files then runs the final link where the ICE
occurs.


[Bug lto/58528] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478

2013-09-26 Thread charles.frasch at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528

--- Comment #4 from Charles  ---
This seems to be the min to reproduce the error. I have also managed to greatly
reduce the size of the archive libraries. That should help keep the .i file
smaller.

/usr/bin/g++ -O2 -g -DNDEBUG -static-libstdc++ -flto 
CMakeFiles/Fix_Engine_Detail_ut.dir/Fix_Engine_Detail_ut.cpp.o  -o
Fix_Engine_Detail_ut -rdynamic ../../libfix_engine.a
../../../middleware/libmiddleware.a /usr/local/gtest/gtest/lib/libgtest.a
../../../test/gtest/libtheme-gtest.a ../../../test/libtheme-test.a
/usr/local/boost/boost_1_54_0/lib/libboost_filesystem.a -lrt 
../../../libtheme.a

Adding -r -nostdlib causes the ICE to go away


[Bug lto/58528] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478

2013-09-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528

--- Comment #3 from Richard Biener  ---
The approach documented only works for ICEs at WPA time.  For ICEs
at LTRANS time you'd have to continue after WPA by instead of lto1
invoking the driver with the linker command.

Thus, bisect the object files and libraries in

/usr/bin/g++   -O2 -g -DNDEBUG   -static-libstdc++ -flto -O2
CMakeFiles/Fix_Engine_Detail_ut.dir/Message_Index_ut.cpp.o
CMakeFiles/Fix_Engine_Detail_ut.dir/Message_Log_ut.cpp.o
CMakeFiles/Fix_Engine_Detail_ut.dir/Sequential_Message_Log_ut.cpp.o  -o
Fix_Engine_Detail_ut -rdynamic ../../libfix_engine.a
../../../middleware/libmiddleware.a /usr/local/gtest/gtest/lib/libgtest.a
../../../test/gtest/libtheme-gtest.a ../../../test/libtheme-test.a
/usr/local/boost/boost_1_54_0/lib/libboost_filesystem.a
/usr/local/boost/boost_1_54_0/lib/libboost_program_options.a
/usr/local/boost/boost_1_54_0/lib/libboost_random.a
/usr/local/boost/boost_1_54_0/lib/libboost_regex.a
/usr/local/boost/boost_1_54_0/lib/libboost_serialization.a
/usr/local/boost/boost_1_54_0/lib/libboost_system.a -lrt -lpthread
../../../attributes/libattributes.a ../../../msgs/libmessages.a
/usr/local/lib/libzmq.a -Wl,--whole-archive -Wl,-Bstatic -libverbs -lmlx4
-Wl,-Bdynamic -Wl,--no-whole-archive -Wl,-Bstatic -libmad -libumad
-Wl,-Bdynamic -ldl ../../../json/libjsoncpp.a ../../../libtheme.a
/usr/local/boost/boost_1_54_0/lib/libboost_filesystem.a
/usr/local/boost/boost_1_54_0/lib/libboost_program_options.a
/usr/local/boost/boost_1_54_0/lib/libboost_system.a -lrt -lpthread

adding -r -nostdlib to it (that is, drop as many objects from it as possible).
If the failure also persists with -flto-partition=1to1 then this reduction
will be much more deterministic.

For the remaining object files and libraries try to build up a compile-and-link
commandline substituting sources for objects and provide preprocessed
source for them.

Hopefully the process ends up in one (unlikely) to three source files needed.


[Bug lto/58528] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478

2013-09-25 Thread charles.frasch at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528

--- Comment #2 from Charles  ---
Hi,

I think I got this right. Found a file in /tmp that had stuff like this:

CMakeFiles/Fix_Engine_Detail_ut.dir/Message_Index_ut.cpp.o
CMakeFiles/Fix_Engine_Detail_ut.dir/Message_Log_ut.cpp.o
CMakeFiles/Fix_Engine_Detail_ut.dir/Sequential_Message_Log_ut.cpp.o
../../libfix_engine.a@0x3c558ba
../../libfix_engine.a@0x4037b36
../../libfix_engine.a@0x42ded96
../../libfix_engine.a@0x43f27d2
../../libfix_engine.a@0x44a830e
../../libfix_engine.a@0x457237a
../../libfix_engine.a@0x14fd36a
../../libfix_engine.a@0x3ad7d36
../../../middleware/libmiddleware.a@0x9f45c0
../../../middleware/libmiddleware.a@0xff39dc
../../../middleware/libmiddleware.a@0x100c350
../../../middleware/libmiddleware.a@0x102909c
../../../middleware/libmiddleware.a@0x98fd04
../../../test/gtest/libtheme-gtest.a@0xd2d78
../../../test/gtest/libtheme-gtest.a@0x142d8c
../../../test/libtheme-test.a@0x632
../../../json/libjsoncpp.a@0x3816
../../../libtheme.a@0x5ef90
../../../libtheme.a@0xef438
../../../libtheme.a@0x10637c
../../../libtheme.a@0x4743b0
../../../libtheme.a@0x4a2000
../../../libtheme.a@0x64806c
../../../libtheme.a@0x6ae8c8
../../../libtheme.a@0x7d3a90
../../../libtheme.a@0x92f87c
../../../libtheme.a@0x2c1dc

Used that file as @ input to lto1 with all of the options from the failure
invocation, thusly:
/usr/lib/gcc/x86_64-linux-gnu/4.8.1/lto1 -o /dev/null @$1 -O2 -g -DNDEBUG
-static-libstdc++ -flto -O2

This runs to completion without failure and no ICE. and produces what looks
to me to be an assembly file (after changing /dev/null).

If this approach is correct then I can't reproduce the error following the
instructions at "Reducing LTO Bugs"

On a whim I tried the command line with -save-temps and -v. It seems to be
failing on the ltrans16 file:

COLLECT_GCC_OPTIONS='-c' '-fexceptions' '-mtune=generic' '-march=x86-64'
'-O2' '-g' '-D' 'NDEBUG' '-O2' '-rdynamic' '-v' '-save-temps'
'-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' './'
'-dumpbase' 'Fix_Engine_Detail_ut.ltrans16' '-fltrans' '-o'
'Fix_Engine_Detail_ut.ltrans16.ltrans.o' '-shared-libgcc'
 /usr/lib/gcc/x86_64-linux-gnu/4.8/lto1 -quiet -dumpdir ./ -dumpbase
Fix_Engine_Detail_ut.ltrans16 -mtune=generic -march=x86-64 -mtune=generic
-march=x86-64 -auxbase-strip Fix_Engine_Detail_ut.ltrans16.ltrans.o -g -O2
-O2 -version -fexceptions -fltrans @/tmp/ccibKIU0 -o
Fix_Engine_Detail_ut.ltrans16.s

causes the ICE.

Would the Fix_Engine_Detail_ut.ltrans16.s or .o help. The .s file appears
to truncated stopping right after the .Letext0: label.

If not which other reduction approach to you think would be the most
fruitful.

Thanks,
Charlie Frasch


On Wed, Sep 25, 2013 at 8:35 AM, rguenth at gcc dot gnu.org <
gcc-bugzi...@gcc.gnu.org> wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528
>
> --- Comment #1 from Richard Biener  ---
> Please try to reduce the testcase, see
> http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction
>
> --
> You are receiving this mail because:
> You reported the bug.
>


[Bug lto/58528] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478

2013-09-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528

--- Comment #1 from Richard Biener  ---
Please try to reduce the testcase, see
http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction