Created attachment 646046 [details] source code producing ICE trying to recompile rosetta (a huge scientific software package) using "gcc (Gentoo 10.1.0-r1 p2) 10.1.0" produces an internal compiler error; earlier gcc versions (9.2, 8.3) compiled the software. VIP_Mover.cc: In function 'core::scoring::packstat::PackstatReal core::scoring::packstat::compute_sasa_generic(utility::vector1<T>&, core::scoring::packstat::PackstatReal, bool)': VIP_Mover.cc:185125:41: internal compiler error: unexpected expression '(short unsigned int)l->atom_sasa_masks.ObjexxFCL::FArray2D<ObjexxFCL::ubyte>::operator[]()' of kind implicit_conv_expr 185125 | ctr += bit_count[atom_sasa_masks[ l ]]; | ^ Please submit a full bug report, with preprocessed source if appropriate. See <https://bugs.gentoo.org/> for instructions. raw and preprocessed source code files attached further info needed? or should i report at gcc.gnu.org?
Created attachment 646048 [details] preprocessed source producing ICE
I can reproduce on 'gcc-11.0.0 -c -x c++ VIP_Mover.i'. Should be good enough for me to follow up. But if you want to do it yourself you can also do it. There are some notes at: https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide
gcc master does not crash. Probably fixed by https://gcc.gnu.org/PR95508
Created attachment 646086 [details, diff] 35_all_ICE-array-subscript-PR95508.patch Try 35_all_ICE-array-subscript-PR95508.patch patch. You can drop it to /etc/portage/patches/sys-devel/gcc:10/ to get applied automatically.
cvise reduced example down to something similar in upstream bug WRT implicit conversion: """ class a { operator int(); }; class b { a operator[](long); } extern c[]; template <class> void d() { b e; int f; c[e[f]] """
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=21ed34524e3ab3139c811b6d61f50522ebd2b184 commit 21ed34524e3ab3139c811b6d61f50522ebd2b184 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-06-24 20:14:42 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-06-24 20:14:42 +0000 10.1.0: backport PR95508, ICE on array subscript implicit conversion Reported-by: hsk17@mail.de Bug: https://bugs.gentoo.org/729434 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> .../35_all_ICE-array-subscript-PR95508.patch | 106 +++++++++++++++++++++ 10.1.0/gentoo/README.history | 1 + 2 files changed, 107 insertions(+)
The patch should land in gentoo within a month with next patchset.
grabbed up the patch, took me the whole day to recompile gcc and then to resolve some other gcc10 compatability glitches in the rosetta software - but now: success! a huge THANK YOU
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=ad32bf914e7dda8709a7adb8197bc43917be4f41 commit ad32bf914e7dda8709a7adb8197bc43917be4f41 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-07-04 07:44:32 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-07-04 07:44:32 +0000 10.1.0: cut 3 patchset Four new patches: + 33_all_avx512-scalar-PR95528.patch: fix ICE on small avx512 unpack + 34_all_cet-cross-x86.patch: backport CET cross-compilation fix + 35_all_ICE-array-subscript-PR95508.patch: fix ICE on some C++ array subscripts + 36_all_fno-delayed-branch.patch: disable -fdelayed-branch to to fix python mis-compilation. Bug: https://gcc.gnu.org/PR95528 Bug: https://bugs.gentoo.org/727028 Bug: https://gcc.gnu.org/94998 Bug: https://bugs.gentoo.org/729074 Bug: https://gcc.gnu.org/PR95508 Bug: https://bugs.gentoo.org/729434 Reported-by: Jeroen Roovers Bug: https://gcc.gnu.org/PR96015 Bug: https://bugs.gentoo.org/729570. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> 10.1.0/gentoo/README.history | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a478857e97c4a4d2769ded41b859c5dcfc3cbf9 commit 9a478857e97c4a4d2769ded41b859c5dcfc3cbf9 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-07-04 07:54:40 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-07-04 08:09:16 +0000 sys-devel/gcc: 10.1.0: cut 3 patchset Four new patches: + 33_all_avx512-scalar-PR95528.patch: fix ICE on small avx512 unpack + 34_all_cet-cross-x86.patch: backport CET cross-compilation fix + 35_all_ICE-array-subscript-PR95508.patch: fix ICE on some C++ array subscripts + 36_all_fno-delayed-branch.patch: disable -fdelayed-branch to to fix python mis-compilation. Bug: https://gcc.gnu.org/PR95528 Bug: https://bugs.gentoo.org/727028 Bug: https://gcc.gnu.org/94998 Bug: https://bugs.gentoo.org/729074 Bug: https://gcc.gnu.org/PR95508 Bug: https://bugs.gentoo.org/729434 Reported-by: Jeroen Roovers Bug: https://gcc.gnu.org/PR96015 Bug: https://bugs.gentoo.org/729570. Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-devel/gcc/Manifest | 1 + sys-devel/gcc/gcc-10.1.0-r2.ebuild | 13 +++++++++++++ 2 files changed, 14 insertions(+)
Should be fixed by gcc-10.1.0-r2 in https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a478857e97c4a4d2769ded41b859c5dcfc3cbf9