From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 97D813858D32; Thu, 3 Nov 2022 11:23:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 97D813858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667474606; bh=B3QsYvKcQkM7ehYHFxY+qze2Jvh3/Q76Q9Du/cd3OaI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XxQtWag5l9eex4cmVC5AuZw6ZRYEAGxRntq627w8LocqYGnZcCqrUOci2in3IY3Gh 6HHbUI9UtEiF+E/WUxlz74Qt846puYuWoDNsdl3DivLXq0ULjMNSRCPYGir9Lj+QWE 2TCAZgBQ4fiFoPCFdm5OhDMxM9LGRBurNnxlfgU8= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107516] [13 Regression] ICE with -fwide-exec-charset=latin1 Date: Thu, 03 Nov 2022 11:23:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.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: Message-ID: In-Reply-To: References: 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=3D107516 --- Comment #1 from Jonathan Wakely --- Maybe a similar issue to PR 81050, i.e. Latin1 isn't valid as a wide charse= t. In which case, we should give an error instead of ICE if possible. Reduced to remove library headers and C++20 features: template constexpr bool is_same_v =3D false; template constexpr bool is_same_v =3D true; template auto units_suffix() noexcept { if constexpr (is_same_v) return L"ms"; else return "ms"; } int main() { units_suffix(); } during RTL pass: expand ice.cc: In function =E2=80=98auto units_suffix() [with CharT =3D wchar_t]= =E2=80=99: ice.cc:9:12: internal compiler error: in get_constant_size, at varasm.cc:34= 18 9 | return L"ms"; | ^~~~~ 0x8a6410 get_constant_size /home/jwakely/src/gcc/gcc/gcc/varasm.cc:3418 0x1519a88 assemble_constant_contents /home/jwakely/src/gcc/gcc/gcc/varasm.cc:3615 0x151af15 output_constant_def_contents /home/jwakely/src/gcc/gcc/gcc/varasm.cc:3666 0x151b264 maybe_output_constant_def_contents /home/jwakely/src/gcc/gcc/gcc/varasm.cc:3602 0x151b264 output_constant_def(tree_node*, int) /home/jwakely/src/gcc/gcc/gcc/varasm.cc:3568 0xe23b2e expand_expr_constant /home/jwakely/src/gcc/gcc/gcc/expr.cc:8592 0xe23b2e expand_expr_addr_expr_1 /home/jwakely/src/gcc/gcc/gcc/expr.cc:8619 0xe24169 expand_expr_addr_expr /home/jwakely/src/gcc/gcc/gcc/expr.cc:8812 0xe19464 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /home/jwakely/src/gcc/gcc/gcc/expr.cc:12096 0xe26825 store_expr(tree_node*, rtx_def*, int, bool, bool) /home/jwakely/src/gcc/gcc/gcc/expr.cc:6330 0xe28090 expand_assignment(tree_node*, tree_node*, bool) /home/jwakely/src/gcc/gcc/gcc/expr.cc:6051 0xcf589c expand_gimple_stmt_1 /home/jwakely/src/gcc/gcc/gcc/cfgexpand.cc:3946 0xcf589c expand_gimple_stmt /home/jwakely/src/gcc/gcc/gcc/cfgexpand.cc:4044 0xcfc0ce expand_gimple_basic_block /home/jwakely/src/gcc/gcc/gcc/cfgexpand.cc:6096 0xcfdbe7 execute /home/jwakely/src/gcc/gcc/gcc/cfgexpand.cc:6822 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. And this does ICE "gcc version 12.0.1 20220316 (experimental) (GCC)" so it probably is due to checking.=