From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DAE36385828E; Sun, 12 Jun 2022 00:14:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DAE36385828E From: "sam at gentoo dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105931] New: [12 regression] ICE in cxx_eval_constant_expression Date: Sun, 12 Jun 2022 00:14:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sam at gentoo dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jun 2022 00:14:43 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105931 Bug ID: 105931 Summary: [12 regression] ICE in cxx_eval_constant_expression Product: gcc Version: 12.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: sam at gentoo dot org Target Milestone: --- Created attachment 53122 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53122&action=3Dedit ccLjLSAH.out.xz (preprocessed source, original) The reduced test case in bug 105756 now passes with the fix for that bug, b= ut the original issue when building 0ad (0ad-0.0.25b_alpha) remains: `` # x86_64-pc-linux-gnu-g++ -o Unified_cpp_js_src_new-regexp0.o -c=20 -I/var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alp= ha/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/dist/system_wrapp= ers -include /var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha= /libraries/source/spidermonkey/mozjs-78.6.0/config/gcc_hidden.h -fstack-protector-strong -DDEBUG=3D1 -DWASM_SUPPORTS_HUGE_MEMORY -DJS_CACHEIR_SPEW -DJS_STRUCTURED_SPEW -DEXPORT_JS_API -DMOZ_HAS_MOZGLUE -I/var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alp= ha/libraries/source/spidermonkey/mozjs-78.6.0/js/src/new-regexp -I/var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alp= ha/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/js/src/new-regexp -I/var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alp= ha/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/js/src -I/var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alp= ha/libraries/source/spidermonkey/mozjs-78.6.0/js/src -I/var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alp= ha/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/dist/include -fPIC -DMOZILLA_CLIENT -include /var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha= /libraries/source/spidermonkey/mozjs-78.6.0/build-debug/js/src/js-confdefs.h -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++2a-compat -Wduplicated-cond -Wimplicit-fallthrou= gh -Wunused-function -Wunused-variable -Wno-error=3Dmaybe-uninitialized -Wno-error=3Ddeprecated-declarations -Wno-error=3Darray-bounds -Wno-error=3Dcoverage-mismatch -Wno-error=3Dfree-nonheap-object -Wno-multistatement-macros -Wno-error=3Dclass-memaccess -Wno-error=3Ddeprecated-copy -Wformat -Wformat-security -Wformat-overflow= =3D2 -Wno-noexcept-type -fno-sized-deallocation -fno-aligned-new -Werror=3Dformat-security -Wformat -O2 -pipe -march=3Dnative -fdiagnostics-color=3Dalways -frecord-gcc-switches -D_GLIBCXX_ASSERTIONS -g= gdb3 -Werror=3Dformat-security -Wformat -fno-rtti -ffunction-sections -fdata-sec= tions -fno-exceptions -fno-math-errno -pthread -pipe -g -fno-omit-frame-pointer -funwind-tables -fno-strict-aliasing -Werror=3Dformat -Wno-shadow -Wno-attr= ibutes -MD -MP -MF .deps/Unified_cpp_js_src_new-regexp0.o.pp=20=20 Unified_cpp_js_src_new-regexp0.cpp -freport-bug In file included from /var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha= /libraries/source/spidermonkey/mozjs-78.6.0/build-debug/dist/include/mozill= a/ArrayUtils.h:14, from /var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha= /libraries/source/spidermonkey/mozjs-78.6.0/js/src/frontend/TokenStream.h:1= 84, from /var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha= /libraries/source/spidermonkey/mozjs-78.6.0/js/src/new-regexp/RegExpAPI.h:1= 2, from /var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha= /libraries/source/spidermonkey/mozjs-78.6.0/js/src/new-regexp/RegExpAPI.cpp= :11, from Unified_cpp_js_src_new-regexp0.cpp:2: /var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha= /libraries/source/spidermonkey/mozjs-78.6.0/js/src/util/TrailingArray.h: In member function =E2=80=98size_t js::TrailingArray::numElements(Offset, O= ffset) const=E2=80=99: /var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha= /libraries/source/spidermonkey/mozjs-78.6.0/js/src/util/TrailingArray.h:73:= 41: internal compiler error: unexpected expression =E2=80=98ElemSize=E2=80=99 o= f kind template_parm_index 73 | MOZ_ASSERT((end - start) % ElemSize =3D=3D 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ /var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha= /libraries/source/spidermonkey/mozjs-78.6.0/build-debug/dist/include/mozill= a/Assertions.h:445:58: note: in definition of macro =E2=80=98MOZ_VALIDATE_ASSERT_CONDITION_TYPE=E2= =80=99 445 | mozilla::detail::AssertionConditionType::isVal= id, \ | ^ /var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha= /libraries/source/spidermonkey/mozjs-78.6.0/build-debug/dist/include/mozill= a/Assertions.h:482:31: note: in expansion of macro =E2=80=98MOZ_ASSERT_HELPER1=E2=80=99 482 | #define MOZ_ASSERT_GLUE(a, b) a b | ^ /var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha= /libraries/source/spidermonkey/mozjs-78.6.0/build-debug/dist/include/mozill= a/Assertions.h:490:5: note: in expansion of macro =E2=80=98MOZ_ASSERT_GLUE=E2=80=99 490 | MOZ_ASSERT_GLUE(=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 \ | ^~~~~~~~~~~~~~~ /var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha= /libraries/source/spidermonkey/mozjs-78.6.0/js/src/util/TrailingArray.h:73:= 5: note: in expansion of macro =E2=80=98MOZ_ASSERT=E2=80=99 73 | MOZ_ASSERT((end - start) % ElemSize =3D=3D 0); | ^~~~~~~~~~ 0x6def33 cxx_eval_constant_expression =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/conste= xpr.cc:7587 0x6df310 cxx_eval_outermost_constant_expr =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/conste= xpr.cc:7824 0x6e154d potential_constant_expression_1 =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/conste= xpr.cc:9274 0x6e1ef5 potential_constant_expression_1(tree_node*, bool, bool, bool, int) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/conste= xpr.cc:9550 0x6e1ef5 is_constant_expression(tree_node*) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/conste= xpr.cc:9607 0x6e1ef5 is_nondependent_constant_expression(tree_node*) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/conste= xpr.cc:9644 0x6e2b04 maybe_constant_value(tree_node*, tree_node*, bool) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/conste= xpr.cc:8071 0x74e35b fold_for_warn(tree_node*) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/expr.c= c:416 0x8c9552 shorten_compare(unsigned int, tree_node**, tree_node**, tree_node*= *, tree_code*) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/c-family/= c-common.cc:3237 0x889d72 cp_build_binary_op(op_location_t const&, tree_code, tree_node*, tree_node*, int) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/typeck= .cc:6158 0x6bd96c build_new_op(op_location_t const&, tree_code, int, tree_node*, tree_node*, tree_node*, tree_node*, tree_node**, int) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/call.c= c:6935 0x88041b build_x_binary_op(op_location_t const&, tree_code, tree_node*, tree_code, tree_node*, tree_code, tree_node*, tree_node**, int) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/typeck= .cc:4563 0x81f7e7 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, boo= l, bool) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/pt.cc:= 20369 0x82337a instantiate_non_dependent_expr_internal(tree_node*, int) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/pt.cc:= 6367 0x82337a instantiate_non_dependent_expr_sfinae(tree_node*, int) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/pt.cc:= 6388 0x85eec3 finish_decltype_type(tree_node*, bool, int) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/semant= ics.cc:11255 0x7e183f cp_parser_decltype =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/parser= .cc:16540 0x7fa3e7 cp_parser_simple_type_specifier =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/parser= .cc:19647 0x7d6cbd cp_parser_type_specifier =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/parser= .cc:19424 0x7e7eeb cp_parser_type_specifier_seq =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/parser= .cc:24362 Please submit a full bug report, with preprocessed source. Please include the complete backtrace with any bug report. See for instructions. ``` ``` # gcc -v Using built-in specs. COLLECT_GCC=3Dgcc COLLECT_LTO_WRAPPER=3D/usr/libexec/gcc/x86_64-pc-linux-gnu/12.1.1/lto-wrapp= er Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-12.1.1_p20220611/work/gcc-12-20220611/config= ure --host=3Dx86_64-pc-linux-gnu --build=3Dx86_64-pc-linux-gnu --prefix=3D/usr --bindir=3D/usr/x86_64-pc-linux-gnu/gcc-bin/12.1.1 --includedir=3D/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include --datadir=3D/usr/share/gcc-data/x86_64-pc-linux-gnu/12.1.1 --mandir=3D/usr/share/gcc-data/x86_64-pc-linux-gnu/12.1.1/man --infodir=3D/usr/share/gcc-data/x86_64-pc-linux-gnu/12.1.1/info --with-gxx-include-dir=3D/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include/g+= +-v12 --with-python-dir=3D/share/gcc-data/x86_64-pc-linux-gnu/12.1.1/python --enable-languages=3Dc,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --disable-libunwind-exceptions --enable-checking=3Drelease --with-bugurl=3Dhttps://bugs.gentoo.org/ --with-pkgversion=3D'Gentoo Harden= ed 12.1.1_p20220611 p7' --enable-esp --enable-libstdcxx-time --disable-libstdcxx-pch --enable-shared --enable-threads=3Dposix --enable-__cxa_atexit --enable-clocale=3Dgnu --enable-multilib --with-multilib-list=3Dm32,m64 --disable-fixed-point --enable-targets=3Dall --enable-libgomp --disable-libssp --disable-libada --enable-cet --disable-systemtap --disable-valgrind-annotations --disable-vtable-verify --disable-libvtv --with-zstd --enable-lto --with-isl --disable-isl-version-check --enable-default-pie --enable-default-ssp --with-build-config=3Dbootstrap-cet Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.1.1 20220611 (Gentoo Hardened 12.1.1_p20220611 p7) ```=