[Bug ipa/105600] ICE with LTO when building Mumble from git on arm64

2022-05-18 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105600

Martin Liška  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org

--- Comment #7 from Martin Liška  ---
I'm taking a look..

[Bug ipa/105600] ICE with LTO when building Mumble from git on arm64

2022-05-18 Thread acoplan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105600

--- Comment #6 from Alex Coplan  ---
Note the original bug also triggers on GCC 11 but the attached reduced testcase
doesn't, I'm attempting to reduce a testcase that crashes all versions.

[Bug ipa/105600] ICE with LTO when building Mumble from git on arm64

2022-05-18 Thread acoplan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105600

Alex Coplan  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Last reconfirmed||2022-05-18
  Known to work||12.1.0, 13.0

--- Comment #5 from Alex Coplan  ---
Confirmed.

[Bug ipa/105600] ICE with LTO when building Mumble from git on arm64

2022-05-18 Thread acoplan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105600

--- Comment #4 from Alex Coplan  ---
Created attachment 52988
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52988=edit
reduced testcase

I managed to reproduce the environment and reduce a testcase (see the attached
tarball):

$ cat build.sh
#!/bin/bash
set -e
CC=aarch64-linux-gnu-g++
$CC -fsanitize=undefined -flto -O2 -std=gnu++14 -o a.o -c a.cc
$CC -fsanitize=undefined -O2 -std=gnu++14 -o b.o -c b.cc
$CC b.o a.o
$ ./build.sh
a.cc: In instantiation of ‘nlohmann::basic_json< ,
, , ,
, , ,
, , 
>::reference nlohmann::basic_json< ,
, , ,
, , ,
, , 
>::operator[](T) [with T = const char*; ObjectType = std::map;
 = std::vector;  =
std::__cxx11::basic_string;  = bool;
 = long int;  = long unsigned
int;  = double;  =
std::allocator; JSONSerializer = nlohmann::adl_serializer;
 = std::vector; reference =
nlohmann::basic_json<>]’:
a.cc:87:65:   required from here
a.cc:83:3: warning: no return statement in function returning non-void
[-Wreturn-type]
   83 |   }
  |   ^
during IPA pass: icf
lto1: internal compiler error: Segmentation fault
0xd4b25f crash_signal
/home/alecop01/toolchain/src/gcc/gcc/toplev.cc:322
0x11508b9 varpool_node::get_constructor()
/home/alecop01/toolchain/src/gcc/gcc/varpool.cc:300
0x1bd2db6 ipa_icf::sem_variable::equals(ipa_icf::sem_item*,
hash_map, ipa_icf::sem_item*>
>&)
/home/alecop01/toolchain/src/gcc/gcc/ipa-icf.cc:1697
0x1bd3e78 ipa_icf::sem_item_optimizer::subdivide_classes_by_equality(bool)
/home/alecop01/toolchain/src/gcc/gcc/ipa-icf.cc:2731
0x1bdbce0 ipa_icf::sem_item_optimizer::execute()
/home/alecop01/toolchain/src/gcc/gcc/ipa-icf.cc:2464
0x1bde1f2 ipa_icf_driver
/home/alecop01/toolchain/src/gcc/gcc/ipa-icf.cc:3600
0x1bde1f2 ipa_icf::pass_ipa_icf::execute(function*)
/home/alecop01/toolchain/src/gcc/gcc/ipa-icf.cc:3647
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
lto-wrapper: fatal error: aarch64-linux-gnu-g++ returned 1 exit status
compilation terminated.
/home/alecop01/toolchain/build-aarch64-linux-gnu/install/bin/../lib/gcc/aarch64-linux-gnu/13.0.0/../../../../aarch64-linux-gnu/bin/ld:
error: lto-wrapper failed
collect2: error: ld returned 1 exit status

Confirmed on trunk.

[Bug ipa/105600] ICE with LTO when building Mumble from git on arm64

2022-05-17 Thread acoplan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105600

--- Comment #3 from Alex Coplan  ---
Alternatively a Dockerfile to build the Gentoo environment needed to reproduce
the issue might help.

[Bug ipa/105600] ICE with LTO when building Mumble from git on arm64

2022-05-17 Thread acoplan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105600

Alex Coplan  changed:

   What|Removed |Added

 CC||acoplan at gcc dot gnu.org

--- Comment #2 from Alex Coplan  ---
Hi Sam, can you reproduce this in (e.g.) an AArch64 Ubuntu environment? This
might make it easier for others to attempt to reproduce, as I suspect not many
have access to an AArch64 Gentoo environment.