[Bug lto/91288] [8/9/10 Regression] ICE in add_symbol_to_partition_1, at lto/lto-partition.c:153 since r249224

2019-11-03 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91288

JD  changed:

   What|Removed |Added

 CC||t at sharklasers dot com

--- Comment #3 from JD  ---
Encountered seemingly the same error in gcc-9.2 with config bootstrap-lto and
make target profiledbootstrap-lean 

lto1: internal compiler error: in add_symbol_to_partition_1, at
lto/lto-partition.c:216
0x11d9271 add_symbol_to_partition_1
../../gcc-9.2.0/gcc/lto/lto-partition.c:216
0x11d9423 add_symbol_to_partition
../../gcc-9.2.0/gcc/lto/lto-partition.c:271
0x11d90bf add_symbol_to_partition_1
../../gcc-9.2.0/gcc/lto/lto-partition.c:181
0x11d908c add_symbol_to_partition_1
../../gcc-9.2.0/gcc/lto/lto-partition.c:179
0x11d9423 add_symbol_to_partition
../../gcc-9.2.0/gcc/lto/lto-partition.c:271
0x11da0a7 lto_balanced_map(int, int)
../../gcc-9.2.0/gcc/lto/lto-partition.c:596
0x11c4fd0 do_whole_program_analysis
../../gcc-9.2.0/gcc/lto/lto.c:3200
0x11c5348 lto_main()
../../gcc-9.2.0/gcc/lto/lto.c:3399
lto-wrapper: fatal error: /home/test/gccbuild/./prev-gcc/xg++ returned 1 exit
status


lto1: internal compiler error: in add_symbol_to_partition_1, at
lto/lto-partition.c:216
0x11d9271 add_symbol_to_partition_1
../../gcc-9.2.0/gcc/lto/lto-partition.c:216
0x11d9423 add_symbol_to_partition
../../gcc-9.2.0/gcc/lto/lto-partition.c:271
0x11d8db2 add_references_to_partition
../../gcc-9.2.0/gcc/lto/lto-partition.c:112
0x11d9142 add_symbol_to_partition_1
../../gcc-9.2.0/gcc/lto/lto-partition.c:189
0x11d9423 add_symbol_to_partition
../../gcc-9.2.0/gcc/lto/lto-partition.c:271
0x11d8db2 add_references_to_partition
../../gcc-9.2.0/gcc/lto/lto-partition.c:112
0x11d9142 add_symbol_to_partition_1
../../gcc-9.2.0/gcc/lto/lto-partition.c:189
0x11d908c add_symbol_to_partition_1
../../gcc-9.2.0/gcc/lto/lto-partition.c:179
0x11d9423 add_symbol_to_partition
../../gcc-9.2.0/gcc/lto/lto-partition.c:271
0x11da0a7 lto_balanced_map(int, int)
../../gcc-9.2.0/gcc/lto/lto-partition.c:596
0x11c4fd0 do_whole_program_analysis
../../gcc-9.2.0/gcc/lto/lto.c:3200
0x11c5348 lto_main()
../../gcc-9.2.0/gcc/lto/lto.c:3399

[Bug lto/66029] Build error compiling gcc5.1 using LTO

2019-10-31 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66029

JD  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #12 from JD  ---
Use --with-build-config=bootstrap-lto and to not include -flto flag in CFLAGS
and CXXFLAGS (and LDFLAGS).
The build succeeds for gcc 9.2.0

[Bug bootstrap/81883] bootstrap-lto build fails with undefined reference to `_Unwind_Resume'

2019-10-31 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81883

--- Comment #3 from JD  ---
and using --with-build-config=bootstrap-lto

[Bug bootstrap/81883] bootstrap-lto build fails with undefined reference to `_Unwind_Resume'

2019-10-31 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81883

JD  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #2 from JD  ---
I ran into the same issue for 9.2 and realized that the build succeeds if -flto
is not specified in CFLAGS and CXXFLAGS.
So when letting the build throw that flag only when needed lets it succeed.

[Bug bootstrap/81883] bootstrap-lto build fails with undefined reference to `_Unwind_Resume'

2017-08-17 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81883

JD  changed:

   What|Removed |Added

 Target||x86_64
   Host||x86_64

--- Comment #1 from JD  ---
This part of the output may be relevant:
The build was configured with --disable-multilib

Checking multilib configuration for libgcc...
make[3]: Entering directory 'gccbuild/x86_64-pc-linux-gnu/libgcc'
# If this is the top-level multilib, build all the other
# multilibs.
# Early copyback; see "all" above for the rationale.  The
# early copy is necessary so that the gcc -B options find
# the right startup files when linking shared libgcc.
/bin/bash gcc-7.2.0/libgcc/../mkinstalldirs ../.././gcc
parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o crtprec32.o
crtprec64.o crtprec80.o crtfastmath.o";   
\
for file in $parts; do  \
  rm -f ../.././gcc/$file;  \
  /usr/bin/install -c -m 644 $file ../.././gcc/;\
  case $file in \
*.a)\
  gcc-ranlib ../.././gcc/$file ;;   \
  esac; \
done
# @multilib_flags@ is still needed because this may use
# gccbuild/./gcc/xgcc -Bgccbuild/./gcc/ -Bgcc-7.2.0/x86_64-pc-linux-gnu/bin/
-Bgcc-7.2.0/x86_64-pc-linux-gnu/lib/ -isystem
gcc-7.2.0/x86_64-pc-linux-gnu/include -isystem
gcc-7.2.0/x86_64-pc-linux-gnu/sys-includeand -O2  -g -O2 -march=native -O3
-flto -fno-fat-lto-objects -fuse-linker-plugin -DIN_GCC-W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fpic
-mlong-double-80 -DUSE_ELF_SYMVER -g -DIN_LIBGCC2 -fbuilding-libgcc
-fno-stack-protector  directly.
# @multilib_dir@ is not really necessary, but sometimes it has
# more uses than just a directory name.
/bin/bash gcc-7.2.0/libgcc/../mkinstalldirs .
gccbuild/./gcc/xgcc -Bgccbuild/./gcc/ -Bgcc-7.2.0/x86_64-pc-linux-gnu/bin/
-Bgcc-7.2.0/x86_64-pc-linux-gnu/lib/ -isystem
gcc-7.2.0/x86_64-pc-linux-gnu/include -isystem
gcc-7.2.0/x86_64-pc-linux-gnu/sys-include-O2  -g -O2 -march=native -O3
-flto -fno-fat-lto-objects -fuse-linker-plugin -DIN_GCC-W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fpic
-mlong-double-80 -DUSE_ELF_SYMVER -g -DIN_LIBGCC2 -fbuilding-libgcc
-fno-stack-protector  -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1
-Wl,--version-script=libgcc.map -o ./libgcc_s.so.1.tmp -g -O2 -march=native -O3
-flto -fno-fat-lto-objects -fuse-linker-plugin -B./ _muldi3_s.o _negdi2_s.o
_lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o
_clear_cache_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o
_addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o
_negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o
_clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o
_popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o
_powidf2_s.o _powixf2_s.o _mulhc3_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o
_divhc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _bswapsi2_s.o _bswapdi2_s.o
_clrsbsi2_s.o _clrsbdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o
_fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o
_fixunsxfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatundisf_s.o
_floatundidf_s.o _floatundixf_s.o _divdi3_s.o _moddi3_s.o _divmoddi4_s.o
_udivdi3_s.o _umoddi3_s.o _udivmoddi4_s.o _udiv_w_sdiv_s.o cpuinfo_s.o
sfp-exceptions_s.o addtf3_s.o divtf3_s.o multf3_s.o negtf2_s.o subtf3_s.o
unordtf2_s.o fixtfsi_s.o fixunstfsi_s.o floatsitf_s.o floatunsitf_s.o
fixtfdi_s.o fixunstfdi_s.o floatditf_s.o floatunditf_s.o fixtfti_s.o
fixunstfti_s.o floattitf_s.o floatuntitf_s.o extendsftf2_s.o extenddftf2_s.o
extendxftf2_s.o trunctfsf2_s.o trunctfdf2_s.o trunctfxf2_s.o getf2_s.o
letf2_s.o eqtf2_s.o _divtc3_s.o _multc3_s.o _powitf2_s.o
enable-execute-stack_s.o unwind-dw2_s.o unwind-dw2-fde-dip_s.o unwind-sjlj_s.o
unwind-c_s.o emutls_s.o libgcc.a -lc && rm -f ./libgcc_s.so && if [ -f
./libgcc_s.so.1 ]; then mv -f ./libgcc_s.so.1 ./libgcc_s.so.1.backup; else
true; fi && mv ./libgcc_s.so.1.tmp ./libgcc_s.so.1 && (echo "/* GNU ld script";
echo "   Use the shared library, but some functions are only in"; echo "   the
static library.  */"; echo "GROUP ( libgcc_s.so.1 -lgcc )" ) > ./libgcc_s.so
binutils-2.29/x86_64-pc-linux-gnu/bin/ld: error in
/tmp/ccYY0W1A.ltrans0.ltrans.o(.eh_frame); no .eh_frame_hdr table will be
created.

I don't know what's happening there but it seems to have failed and the build
continued.

[Bug bootstrap/81883] New: bootstrap-lto build fails with undefined reference to `_Unwind_Resume'

2017-08-17 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81883

Bug ID: 81883
   Summary: bootstrap-lto build fails with undefined reference to
`_Unwind_Resume'
   Product: gcc
   Version: lto
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: t at sharklasers dot com
  Target Milestone: ---

Created attachment 41999
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41999=edit
Output of a sequential make run for context

I compiled gcc-7.2 without LTO optimizations and tried to compile it again with
bootstrap-lto using the new gcc-7.2 compiler.

System:
Linux 4.4.0-91-generic #114-Ubuntu SMP x86_64 GNU/Linux

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=gcc-7.2.0/libexec/gcc/x86_64-pc-linux-gnu/7.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: gcc-7.2.0/configure --prefix=gcc-7.2.0
--enable-languages=c,c++,fortran --enable-gold=yes --enable-ld=yes
--enable-bootstrap --disable-multilib
Thread model: posix
gcc version 7.2.0 (GCC) 

$ env | grep -i flags
LDFLAGS=-O3 -flto=4 -fuse-linker-plugin
CXXFLAGS=-march=native -O3 -flto -fno-fat-lto-objects -fuse-linker-plugin
CFLAGS=-march=native -O3 -flto -fno-fat-lto-objects -fuse-linker-plugin

$ ld -v
GNU ld (GNU Binutils) 2.29

GCC tools were used
export AR=gcc-ar
export NM=gcc-nm
export RANLIB=gcc-ranlib

The bootstrap-lto build was configured with:
gcc-7.2.0/configure --prefix=gcc-7.2.0 --enable-languages=c,c++,fortran
--enable-gold=yes --enable-ld=yes --enable-bootstrap
--with-build-config=bootstrap-lto --disable-multilib


make[3]: Entering directory 'gccbuild/gcc'
gccbuild/./prev-gcc/xg++ -Bgccbuild/./prev-gcc/
-Bgcc-7.2.0/x86_64-pc-linux-gnu/bin/ -nostdinc++
-Bgccbuild/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-Bgccbuild/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs 
-Igccbuild/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu 
-Igccbuild/prev-x86_64-pc-linux-gnu/libstdc++-v3/include 
-Igcc-7.2.0/libstdc++-v3/libsupc++
-Lgccbuild/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-Lgccbuild/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs   -g -O2
-flto=jobserver -frandom-seed=1 -DIN_GCC -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H
-DGENERATOR_FILE -fno-PIE -static-libstdc++ -static-libgcc  -no-pie -o
build/genmddeps \
build/genmddeps.o build/read-md.o build/errors.o .././libiberty/libiberty.a
binutils-2.29/x86_64-pc-linux-gnu/bin/ld: error in
/tmp/ccK67upk.ltrans0.ltrans.o(.eh_frame); no .eh_frame_hdr table will be
created.
/tmp/ccK67upk.ltrans0.ltrans.o: In function `__verbose_terminate_handler':
gcc-7.2.0/libstdc++-v3/libsupc++/vterminate.cc:82: undefined reference to
`_Unwind_Resume'
collect2: error: ld returned 1 exit status
Makefile:2791: recipe for target 'build/genmddeps' failed
make[3]: *** [build/genmddeps] Error 1
make[3]: Leaving directory 'gccbuild/gcc'
Makefile:4596: recipe for target 'all-stage2-gcc' failed
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory 'gccbuild'
Makefile:26888: recipe for target 'stage2-bubble' failed
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory 'gccbuild'
Makefile:941: recipe for target 'all' failed
make: *** [all] Error 2

[Bug middle-end/70831] [6/7 Regression] FTBFS: Build fails with bootstrap-lto and profiledbootstrap

2017-01-10 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70831

--- Comment #12 from JD  ---
My CPU is Intel Core i7-4800MQ, but I realized my report was misleading.
I get that same error with

LDFLAGS=-flto
CXXFLAGS=-flto
CFLAGS=-flto

which results in
"CFLAGS=-g -O2 -flto" "CXXFLAGS=-g -O2 -flto -D_GNU_SOURCE"
"CFLAGS_FOR_BUILD=-flto" "CFLAGS_FOR_TARGET=-g -O2 -flto"

and

$gcc-6.3.0/configure --prefix=/home/local/gcc-6.3.0lto --enable-languages=c
--with-build-config=bootstrap-lto --disable-multilib

and the error is in
Makefile:369: recipe for target 'libmpxwrappers.la' failed

[Bug middle-end/70831] [6/7 Regression] FTBFS: Build fails with bootstrap-lto and profiledbootstrap

2017-01-08 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70831

--- Comment #10 from JD  ---
Same error without the linker plugin:

LDFLAGS=-O3 -flto=4
CXXFLAGS=-march=native -O3 -flto
CFLAGS=-march=native -O3 -flto

$gcc-6.3.0/configure --prefix=/home/local/gcc-6.3.0lto
--enable-languages=c,c++,fortran --enable-gold=yes --enable-ld=yes
--with-build-config=bootstrap-lto-noplugin --disable-multilib

[Bug middle-end/70831] [6/7 Regression] FTBFS: Build fails with bootstrap-lto and profiledbootstrap

2017-01-08 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70831

JD  changed:

   What|Removed |Added

 CC||t at sharklasers dot com

--- Comment #9 from JD  ---
Compiling GCC 6.3 using GCC 6.3 (built without LTO):

export CFLAGS='-march=native -O3 -flto -fuse-linker-plugin
-fno-fat-lto-objects'
export CXXFLAGS=$CFLAGS
export LDFLAGS='-O3 -flto=4 -fuse-linker-plugin'

$gcc-6.3.0/configure --prefix=/home/local/gcc-6.3.0lto
--enable-languages=c,c++,fortran --enable-gold=yes --enable-ld=yes
--with-build-config=bootstrap-lto --disable-multilib

gcc-6.3.0/libmpx/mpxwrap/mpx_wrappers.c: In function
'__mpx_wrapper_malloc.chkp':
gcc-6.3.0/libmpx/mpxwrap/mpx_wrappers.c:36:9: internal compiler error: in
ultimate_transparent_alias_target, at varasm.c:1263
   void *p = (void *)malloc (size);
 ^
0x10eaf03 ultimate_transparent_alias_target
gcc-6.3.0/gcc/varasm.c:1263
0x10eb447 make_decl_rtl(tree_node*)
gcc-6.3.0/gcc/varasm.c:1349
0x8070d9 rtx_for_function_call
gcc-6.3.0/gcc/calls.c:1829
0x80a360 expand_call(tree_node*, rtx_def*, int)
gcc-6.3.0/gcc/calls.c:3162
0x7ee34a expand_builtin_with_bounds(tree_node*, rtx_def*, rtx_def*,
machine_mode, int)
gcc-6.3.0/gcc/builtins.c:6756
0x979710 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
gcc-6.3.0/gcc/expr.c:10622
0x96e220 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
gcc-6.3.0/gcc/expr.c:7969
0x9654c1 store_expr_with_bounds(tree_node*, rtx_def*, int, bool, bool,
tree_node*)
gcc-6.3.0/gcc/expr.c:5406
0x964262 expand_assignment(tree_node*, tree_node*, bool)
gcc-6.3.0/gcc/expr.c:5175
0x820bb3 expand_call_stmt
gcc-6.3.0/gcc/cfgexpand.c:2658
0x823ac1 expand_gimple_stmt_1
gcc-6.3.0/gcc/cfgexpand.c:3548
0x824198 expand_gimple_stmt
gcc-6.3.0/gcc/cfgexpand.c:3714
0x82b316 expand_gimple_basic_block
gcc-6.3.0/gcc/cfgexpand.c:5720
0x82cdd9 execute
gcc-6.3.0/gcc/cfgexpand.c:6335
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.

Bug 69791 might be related.

[Bug c++/71174] [concepts] Segmentation fault while processing concepts error

2016-05-18 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71174

--- Comment #3 from JD  ---
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=local/gcc6.1/lib/gcc/x86_64-pc-linux-gnu/6.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-6.1.0/configure --prefix=local/gcc6.1
--enable-languages=c,c++,fortran --enable-gold=yes --enable-ld=yes --enable-lto
--enable-bootstrap --disable-multilib
Thread model: posix
gcc version 6.1.0 (GCC)

[Bug c++/71174] segmentation fault

2016-05-18 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71174

--- Comment #2 from JD  ---
$ g++ -std=c++1z -Wall -Wextra -fconcepts bug.cpp
bug.cpp:10:32: error: concept ‘constexpr bool InputIterator(T)’ declared with
function parameters
 concept bool InputIterator(T it) {
^
g++: internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.

[Bug c++/71174] segmentation fault

2016-05-18 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71174

--- Comment #1 from JD  ---
Created attachment 38515
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38515=edit
Short example

[Bug c++/71174] New: segmentation fault

2016-05-18 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71174

Bug ID: 71174
   Summary: segmentation fault
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: t at sharklasers dot com
  Target Milestone: ---

[Bug c++/66859] [cilk+] internal compiler error: in lower_stmt

2015-07-28 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66859

JD t at sharklasers dot com changed:

   What|Removed |Added

  Known to fail||5.1.0, 5.2.0

--- Comment #1 from JD t at sharklasers dot com ---
Same issue in version 5.2.0


[Bug c++/66859] New: internal compiler error: in lower_stmt

2015-07-13 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66859

Bug ID: 66859
   Summary: internal compiler error: in lower_stmt
   Product: gcc
   Version: 5.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: t at sharklasers dot com
  Target Milestone: ---
  Host: x86_64

Created attachment 35969
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35969action=edit
minimal example

$ g++ -fcilkplus test.cpp 
test.cpp: In function ‘void func(std::__cxx11::string)’:
test.cpp:5:9: warning: statement has no effect [-Wunused-value]
 line;
 ^
test.cpp: In function ‘built-in’:
test.cpp:11:30: internal compiler error: in lower_stmt, at gimple-low.c:396
 cilk_spawn func(line);
  ^
0xfe0d53 lower_stmt
../../gcc-5.1.0/gcc/gimple-low.c:396
0xfe0d53 lower_sequence
../../gcc-5.1.0/gcc/gimple-low.c:227
0xfe0dd2 lower_try_catch
../../gcc-5.1.0/gcc/gimple-low.c:469
0xfe0dd2 lower_stmt
../../gcc-5.1.0/gcc/gimple-low.c:291
0xfe0dd2 lower_sequence
../../gcc-5.1.0/gcc/gimple-low.c:227
0xfe0b5c lower_stmt
../../gcc-5.1.0/gcc/gimple-low.c:296
0xfe0b5c lower_sequence
../../gcc-5.1.0/gcc/gimple-low.c:227
0xfe09b1 lower_gimple_bind
../../gcc-5.1.0/gcc/gimple-low.c:441
0xfe180d lower_function_body
../../gcc-5.1.0/gcc/gimple-low.c:131
0xfe180d execute
../../gcc-5.1.0/gcc/gimple-low.c:205


The error does not appear if func takes the string by reference.


openSUSE 13.2 (Harlequin) (x86_64)

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=local/gcc5.1/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-5.1.0/configure --prefix=local/gcc5.1
--enable-languages=c,c++,fortran --enable-gold=yes --enable-ld=yes --enable-lto
--enable-bootstrap --disable-multilib
Thread model: posix
gcc version 5.1.0 (GCC)

[Bug debug/66301] internal compiler error when using -fopt-info

2015-05-27 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66301

--- Comment #1 from JD t at sharklasers dot com ---
german@prometheus ~/test $ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=local/gcc5.1/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-5.1.0/configure --prefix=local/gcc5.1
--enable-languages=c,c++ --enable-gold=yes --enable-ld=yes --enable-lto
--enable-bootstrap --disable-multilib
Thread model: posix
gcc version 5.1.0 (GCC)

openSUSE 13.2 (Harlequin) (x86_64)


[Bug c++/66301] New: internal compiler error when using -fopt-info

2015-05-27 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66301

Bug ID: 66301
   Summary: internal compiler error when using -fopt-info
   Product: gcc
   Version: 5.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: t at sharklasers dot com
  Target Milestone: ---

Created attachment 35631
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35631action=edit
preprocessed source

$ g++ -O3 -fopt-info-missed-optall test.cpp
test.cpp: In member function 'std::ctypechar::char_type
std::ctypechar::widen(char) const':
test.cpp:14:1: internal compiler error: Segmentation fault
 }
 ^
0xaf4caf crash_signal
../../gcc-5.1.0/gcc/toplev.c:383
0x975511 dump_possible_polymorphic_call_targets(_IO_FILE*, tree_node*, long,
ipa_polymorphic_call_context const)
../../gcc-5.1.0/gcc/ipa-devirt.c:3190
0xc09e85 eliminate_dom_walker::before_dom_children(basic_block_def*)
../../gcc-5.1.0/gcc/tree-ssa-pre.c:4394
0xfd8741 dom_walker::walk(basic_block_def*)
../../gcc-5.1.0/gcc/domwalk.c:188
0xc0900b eliminate
../../gcc-5.1.0/gcc/tree-ssa-pre.c:4540
0xc09325 execute
../../gcc-5.1.0/gcc/tree-ssa-pre.c:4978
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See http://gcc.gnu.org/bugs.html for instructions.


[Bug lto/66027] lto1: internal compiler error: in odr_types_equivalent_p

2015-05-07 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66027

--- Comment #2 from JD t at sharklasers dot com ---
I managed create a minimal example.

bug66027 $ make -j 
g++ -std=c++14 -c -fPIC -march=native -O3 -flto -fuse-linker-plugin
-fno-fat-lto-objects ASTContext_preproc.cpp -o ASTContext_preproc.o
g++ -std=c++14 -c -fPIC -march=native -O3 -flto -fuse-linker-plugin
-fno-fat-lto-objects ASTConsumer_preproc.cpp -o ASTConsumer_preproc.o
ar cru libAST.a ASTContext_preproc.o ASTConsumer_preproc.o
g++ -flto=4 -std=c++14 -march=native -fuse-linker-plugin -shared -o bla.so
CIndex_preproc.cpp libAST.a
 nullptr_type 0x7f9352ff5d20 decltype(nullptr) unsigned DI
size integer_cst 0x7f9353b9bbb8 type integer_type 0x7f9353b9f150
bitsizetype constant 64
unit size integer_cst 0x7f9353b9bbd0 type integer_type 0x7f9353b9f0a8
sizetype constant 8
align 8 symtab 0 alias set 0 canonical type 0x7f9352ff5d20
pointer_to_this pointer_type 0x7f9352782738 reference_to_this
reference_type 0x7f9352ff6000
lto1: internal compiler error: in odr_types_equivalent_p, at ipa-devirt.c:1543
0x807397 odr_types_equivalent_p
../../gcc-5.1.0/gcc/ipa-devirt.c:1543
0x8076ad odr_types_equivalent_p
../../gcc-5.1.0/gcc/ipa-devirt.c:1440
0x804ca1 add_type_duplicate
../../gcc-5.1.0/gcc/ipa-devirt.c:1770
0x804ca1 get_odr_type(tree_node*, bool)
../../gcc-5.1.0/gcc/ipa-devirt.c:1959
0x80642c register_odr_type(tree_node*)
../../gcc-5.1.0/gcc/ipa-devirt.c:2034
0x63876d lto_read_decls
../../gcc-5.1.0/gcc/lto/lto.c:1952
0x6394ae lto_file_finalize
../../gcc-5.1.0/gcc/lto/lto.c:2249
0x6394ae lto_create_files_from_ids
../../gcc-5.1.0/gcc/lto/lto.c:2259
0x6394ae lto_file_read
../../gcc-5.1.0/gcc/lto/lto.c:2300
0x6394ae read_cgraph_and_symbols
../../gcc-5.1.0/gcc/lto/lto.c:3005
0x6394ae lto_main()
../../gcc-5.1.0/gcc/lto/lto.c:3475
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See http://gcc.gnu.org/bugs.html for instructions.
lto-wrapper: fatal error: g++ returned 1 exit status
compilation terminated.
/usr/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status
Makefile:7: recipe for target 'all' failed
make: *** [all] Error 1

ld -v
GNU ld (GNU Binutils; openSUSE 13.2) 2.24.0.20140403-6.1

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/german/local/gcc5.1/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-5.1.0/configure --prefix=/home/german/local/gcc5.1
--enable-languages=c,c++ --enable-gold=yes --enable-ld=yes --enable-lto
--enable-bootstrap --disable-multilib
Thread model: posix
gcc version 5.1.0 (GCC)

ar --version
GNU ar (GNU Binutils; openSUSE 13.2) 2.24.0.20140403-6.1


[Bug lto/66029] Build error compiling gcc5.1 using LTO

2015-05-07 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66029

--- Comment #11 from JD t at sharklasers dot com ---
Yes, it's non-empty:

$ ar --help | grep plugin
Usage: ar [emulation options] [-]{dmpqrstx}[abcDfilMNoPsSTuvV] [--plugin
name] [member-name] [count] archive-file file...
  --plugin p - load the specified plugin
ar: supported targets: elf64-x86-64 elf32-i386 elf32-x86-64 a.out-i386-linux
pei-i386 pei-x86-64 elf64-l1om elf64-k1om elf64-little elf64-big elf32-little
elf32-big plugin srec symbolsrec verilog tekhex binary ihex


$  echo int main () {} | gcc -x c++ -O2 - -flto -v 21 | grep collect2
-plugin
 gcc5.1/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/collect2 -plugin
gcc5.1/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/liblto_plugin.so
-plugin-opt=gcc5.1/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper
-plugin-opt=-fresolution=/tmp/ccuU0Nuu.res -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -flto
--eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2
/usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o
gcc5.1/lib64/gcc/x86_64-unknown-linux-gnu/5.1.0/crtbegin.o
-Lgcc5.1/lib64/gcc/x86_64-unknown-linux-gnu/5.1.0
-Lgcc5.1/lib64/gcc/x86_64-unknown-linux-gnu/5.1.0/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64
-Lgcc5.1/lib64/gcc/x86_64-unknown-linux-gnu/5.1.0/../../.. /tmp/ccUoazVJ.o
-lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s
--no-as-needed gcc5.1/lib64/gcc/x86_64-unknown-linux-gnu/5.1.0/crtend.o
/usr/lib/../lib64/crtn.o


[Bug lto/66029] Build error compiling gcc5.1 using LTO

2015-05-07 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66029

--- Comment #9 from JD t at sharklasers dot com ---
I reconfigured and recompiled binutils 2.25 with the --enable-plugins and
--enable-lto flags.

But I'm afraid I must be missing something: Linking with the newly compiled ld
2.25 works fine without lto but using it with lto produces undefined reference
errors.


[Bug lto/66027] lto1: internal compiler error: in odr_types_equivalent_p

2015-05-07 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66027

--- Comment #4 from JD t at sharklasers dot com ---
Removing the -O3 flag from the first two invocations changes the behavior:

g++ -std=c++14 -c -fPIC -march=native -flto -fuse-linker-plugin
-fno-fat-lto-objects ASTContext_preproc.cpp -o ASTContext_preproc.o
g++ -std=c++14 -c -fPIC -march=native -flto -fuse-linker-plugin
-fno-fat-lto-objects ASTConsumer_preproc.cpp -o ASTConsumer_preproc.o
ar cru libAST.a ASTContext_preproc.o ASTConsumer_preproc.o
g++ -flto=4 -std=c++14 -march=native -fuse-linker-plugin -shared -o bla.so
CIndex_preproc.cpp libAST.a
/usr/bin/ld: /tmp/ccPyzc8a.ltrans0.ltrans.o: relocation R_X86_64_32 against
`_ZZN4llvm11isa_impl_clIN5clang24OMPThreadPrivateDeclAttrEPKNS1_4AttrEE4doitES5_E19__PRETTY_FUNCTION__.lto_priv.73'
can not be used when making a shared object; recompile with -fPIC
/tmp/ccPyzc8a.ltrans0.ltrans.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

Adding the -fPIC flag as told makes the example compile successfully with and
without -O3.
-

Removing the -march=native flags causes a compilation error:
g++ -std=c++14 -c -fPIC -O3 -flto -fuse-linker-plugin -fno-fat-lto-objects
ASTContext_preproc.cpp -o ASTContext_preproc.o
g++ -std=c++14 -c -fPIC -O3 -flto -fuse-linker-plugin -fno-fat-lto-objects
ASTConsumer_preproc.cpp -o ASTConsumer_preproc.o
ar cru libAST.a ASTContext_preproc.o ASTConsumer_preproc.o

g++ -flto=4 -std=c++14 -fuse-linker-plugin -shared -o bla.so CIndex_preproc.cpp
libAST.a
In file included from
gcc5.1/lib64/gcc/x86_64-unknown-linux-gnu/5.1.0/include/x86intrin.h:27:0,
 from
gcc5.1/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/opt_random.h:33,
 from gcc5.1/include/c++/5.1.0/random:50,
 from gcc5.1/include/c++/5.1.0/bits/stl_algo.h:66,
 from gcc5.1/include/c++/5.1.0/algorithm:62,
 from llvm/include/llvm/ADT/StringRef.h:13,
 from CIndexer.h:19,
 from CIndex.cpp:15:
gcc5.1/lib64/gcc/x86_64-unknown-linux-gnu/5.1.0/include/ia32intrin.h: In
function 'unsigned int __crc32b(unsigned int, unsigned char)':
gcc5.1/lib64/gcc/x86_64-unknown-linux-gnu/5.1.0/include/ia32intrin.h:63:42:
error: '__builtin_ia32_crc32qi' was not declared in this scope
   return __builtin_ia32_crc32qi (__C, __V);
  ^
...
...

I added the output of
gcc -march=native -Q --help=target


[Bug lto/66027] lto1: internal compiler error: in odr_types_equivalent_p

2015-05-07 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66027

--- Comment #3 from JD t at sharklasers dot com ---
Created attachment 35490
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35490action=edit
preprocessed sources and makefile


[Bug lto/66027] lto1: internal compiler error: in odr_types_equivalent_p

2015-05-07 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66027

--- Comment #5 from JD t at sharklasers dot com ---
Created attachment 35492
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35492action=edit
output of gcc -march=native -Q --help=target


[Bug lto/66029] Build error compiling gcc5.1 using LTO

2015-05-06 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66029

--- Comment #4 from JD t at sharklasers dot com ---
I tried as you advised; this is the configuration I'm trying to build:
  $ ../gcc-5.1.0/configure --prefix=gcc5.1 --enable-languages=c,c++
--enable-gold=yes --enable-ld=yes --enable-lto --enable-bootstrap
--with-build-config=bootstrap-lto --disable-multilib

The linker is:
GNU ld (GNU Binutils; openSUSE 13.2) 2.24.0.20140403-6.1

Information for package binutils:
-
Repository: openSUSE-13.2-Oss
Name: binutils
Version: 2.24-6.1.7
Arch: x86_64
Vendor: openSUSE
Installed: Yes
Status: up-to-date


[Bug lto/66029] Build error compiling gcc5.1 using LTO

2015-05-06 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66029

--- Comment #6 from JD t at sharklasers dot com ---
Concerning the latest release of binutils, I have to admit I've never used a
local installation, so I might be doing something wrong here.

I downloaded and compiled version 2.25 and with that I get undefined references
to libiberty functions. I attached the diagnostics.


[Bug lto/66029] Build error compiling gcc5.1 using LTO

2015-05-06 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66029

--- Comment #5 from JD t at sharklasers dot com ---
Created attachment 35477
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35477action=edit
errors using binutils 2.25


[Bug lto/66029] New: Build error compiling gcc5.1 using LTO

2015-05-05 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66029

Bug ID: 66029
   Summary: Build error compiling gcc5.1 using LTO
   Product: gcc
   Version: 5.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: t at sharklasers dot com
  Target Milestone: ---

Created attachment 35469
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35469action=edit
complete command line

I compiled gcc5.1 without LTO optimizations and tried to compile it again with
LTO using the new 5.1 compiler.


openSUSE 13.2 (Harlequin) (x86_64)

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=gcc5.1/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-5.1.0/configure --prefix=gcc5.1
--enable-languages=c,c++ --enable-gold=yes --enable-ld=yes --enable-lto
--enable-bootstrap --disable-multilib
Thread model: posix
gcc version 5.1.0 (GCC)


/usr/bin/ld: error in /tmp/cc4PfHUo.ltrans1.ltrans.o(.eh_frame); no
.eh_frame_hdr table will be created.
`_Unwind_Resume' referenced in section `.text' of
/tmp/cc4PfHUo.ltrans1.ltrans.o: defined in discarded section `.text' of
unwind-dw2.o (symbol from plugin)
`_Unwind_Resume' referenced in section `.text' of
/tmp/cc4PfHUo.ltrans3.ltrans.o: defined in discarded section `.text' of
unwind-dw2.o (symbol from plugin)
`_Unwind_Resume' referenced in section `.text' of
/tmp/cc4PfHUo.ltrans3.ltrans.o: defined in discarded section `.text' of
unwind-dw2.o (symbol from plugin)
`_Unwind_Resume' referenced in section `.text.unlikely' of
/tmp/cc4PfHUo.ltrans8.ltrans.o: defined in discarded section `.text' of
unwind-dw2.o (symbol from plugin)
collect2: error: ld returned 1 exit status
Makefile:2606: recipe for target 'build/genmatch' failed


[Bug lto/66029] Build error compiling gcc5.1 using LTO

2015-05-05 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66029

--- Comment #1 from JD t at sharklasers dot com ---
I compiled with used:
-O3 -flto -fuse-linker-plugin -fno-fat-lto-objects

and tried to link with:
-flto=4 -O3 -fuse-linker-plugin


[Bug lto/66027] New: lto1: internal compiler error: in odr_types_equivalent_p

2015-05-05 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66027

Bug ID: 66027
   Summary: lto1: internal compiler error: in
odr_types_equivalent_p
   Product: gcc
   Version: 5.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: t at sharklasers dot com
  Target Milestone: ---

Created attachment 35468
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35468action=edit
complete commandline used to link

openSUSE 13.2 (Harlequin) (x86_64)

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=gcc5.1/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-5.1.0/configure --prefix=gcc5.1
--enable-languages=c,c++ --enable-gold=yes --enable-ld=yes --enable-lto
--enable-bootstrap --disable-multilib
Thread model: posix
gcc version 5.1.0 (GCC)

llvm[4]: Linking Release+Asserts Shared Library libclang.so
 nullptr_type 0x7f717e5c92a0 decltype(nullptr) unsigned DI
size integer_cst 0x7f717f5a9bb8 type integer_type 0x7f717f5ad150
bitsizetype constant 64
unit size integer_cst 0x7f717f5a9bd0 type integer_type 0x7f717f5ad0a8
sizetype constant 8
align 8 symtab 0 alias set 0 canonical type 0x7f717e5c92a0
pointer_to_this pointer_type 0x7f7178ac0d20 reference_to_this
reference_type 0x7f7178e68930
lto1: internal compiler error: in odr_types_equivalent_p, at ipa-devirt.c:1543
0x807397 odr_types_equivalent_p
../../gcc-5.1.0/gcc/ipa-devirt.c:1543
0x8076ad odr_types_equivalent_p
../../gcc-5.1.0/gcc/ipa-devirt.c:1440
0x804ca1 add_type_duplicate
../../gcc-5.1.0/gcc/ipa-devirt.c:1770
0x804ca1 get_odr_type(tree_node*, bool)
../../gcc-5.1.0/gcc/ipa-devirt.c:1959
0x80642c register_odr_type(tree_node*)
../../gcc-5.1.0/gcc/ipa-devirt.c:2034
0x63876d lto_read_decls
../../gcc-5.1.0/gcc/lto/lto.c:1952
0x6394ae lto_file_finalize
../../gcc-5.1.0/gcc/lto/lto.c:2249
0x6394ae lto_create_files_from_ids
../../gcc-5.1.0/gcc/lto/lto.c:2259
0x6394ae lto_file_read
../../gcc-5.1.0/gcc/lto/lto.c:2300
0x6394ae read_cgraph_and_symbols
../../gcc-5.1.0/gcc/lto/lto.c:3005
0x6394ae lto_main()
../../gcc-5.1.0/gcc/lto/lto.c:3475