From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3B2A03858C50; Wed, 8 May 2024 21:20:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3B2A03858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1715203259; bh=/WkURZYvuNe+ZwUyvUkCWI5GdcHIIVUrgQ8nrIlUyyU=; h=From:To:Subject:Date:From; b=x2FdBcao+HUUMGsB+N05TH1rwq6OAXxb5at9fCsW11tgG12wOnTv82ybzjHpWXsCJ gJcZsizgHVOFVkZ1J1cMZzgVsCaPGacpnBV2/Z2iDMii1G6rYMKecQNOYhhcbI8s+i V1Nd9tpHYLM3ZOyUu3gQfsh3jeXNrGuJb2RgqPRw= From: "clopez at igalia dot com" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBjKysvMTE0OTk3XSBOZXc6IElDRSB3aXRoIC1zdGQ9Yysr?= =?UTF-8?B?MjA6IHVuZXhwZWN0ZWQgZXhwcmVzc2lvbiDigJhzdGF0aWNfY2FzdDxVbnNp?= =?UTF-8?B?Z25lZFR5cGU+KCdcIicp4oCZIG9mIGtpbmQgc3RhdGljX2Nhc3RfZXhwcg==?= Date: Wed, 08 May 2024 21:20:58 +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.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: clopez at igalia dot com 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114997 Bug ID: 114997 Summary: ICE with -std=3Dc++20: unexpected expression =E2=80=98static_cast('\"')=E2=80=99 of ki= nd static_cast_expr Product: gcc Version: 12.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: clopez at igalia dot com Target Milestone: --- Created attachment 58137 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D58137&action=3Dedit preprocessed file from JSONObject.cpp to reproduce the problem On the WebKit project recently this commit landed: https://github.com/WebKit/WebKit/commit/4855c7a1dc4214523c0b3d0c430215456ed= 7a0a9 It caused GCC-12 to fail with an ICE. ./Source/JavaScriptCore/runtime/JSONObject.cpp: In lambda function: ./Source/JavaScriptCore/runtime/JSONObject.cpp:1124:89: internal compiler error: unexpected expression =E2=80=98static_cast('\"')=E2=80= =99 of kind static_cast_expr 1124 | constexpr auto quoteMask =3D WTF::splatBulk(static_cast('"')); |=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=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ^ 0x7ffb005ff1c9 __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 0x7ffb005ff284 __libc_start_main_impl ../csu/libc-start.c:360 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. I checked that it fails with the last released version of GCC 12 (12.3.0) b= oth from Yocto when cross-building for ARM64 as well as the GCC 12.3.0 shipped in Debian/testing. On Debian I tested with gcc-13 and with it builds fine. I'm attaching the .ii file to reproduce the problem (compressed with xz as = it is quite big) To reproduce it, download the .ii file and simple execute this command: g++-12 -O3 --std=3Dc++20 -c JSONObject.ii Not sure if useful information, but the original compiler command had the following switches enabled g++-12 -DBUILDING_JavaScriptCore -DBUILDING_WEBKIT=3D1 -DBUILDING_WITH_CMAK= E=3D1 -DBUILDING_WPE__=3D1 -DBWRAP_EXECUTABLE=3D\"/usr/bin/bwrap\" -DDBUS_PROXY_EXECUTABLE=3D\"/usr/bin/xdg-dbus-proxy\" -DGETTEXT_PACKAGE=3D\= "WPE\" -DHAVE_CONFIG_H=3D1 -DJSC_GLIB_API_ENABLED -DPAS_BMALLOC=3D1 -DPKGLIBDIR=3D\"/usr/local/lib/wpe-webkit-2.0\" -DSTATICALLY_LINKED_WITH_WTF -DSTATICALLY_LINKED_WITH_bmalloc [...-I/long/list/of/includes/excluded/for/clarity...] -fdiagnostics-color=3Dalways -Wextra -Wall -fmax-errors=3D20 -Wno-odr -Wno-stringop-overread -Wno-stringop-overflow -Wno-nonnull -Wno-array-bounds -Wno-expansion-to-defined -Wno-noexcept-type -Wno-psabi -Wno-misleading-indentation -Wno-maybe-uninitialized -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wno-tautological-compare -fno-strict-aliasing -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -O3 -DNDEBUG -fPIC -fvisibility=3Dhidden -fvisibility-inlines-hidden -ffp-contract=3Doff -std=3Dc++20 -c Source/JavaScriptCore/runtime/JSONObject.cpp=