From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 51BE13858C52; Mon, 18 Apr 2022 03:51:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 51BE13858C52 From: "Jack at Applin dot US" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105300] New: segfault from static_assert with user-defined string suffix argument Date: Mon, 18 Apr 2022 03:51:30 +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: 11.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: Jack at Applin dot US 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: Mon, 18 Apr 2022 03:51:31 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105300 Bug ID: 105300 Summary: segfault from static_assert with user-defined string suffix argument Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: Jack at Applin dot US Target Milestone: --- Created attachment 52824 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D52824&action=3Dedit preprocessed source to reproduce the error $ cat bad.ii void operator""_x(const char *, unsigned long); static_assert(false, "foo"_x); $ g++ bad.ii bad.ii:2:15: internal compiler error: Segmentation fault 2 | static_assert(false, "foo"_x); | ^~~~~ 0xb0c67e crash_signal ../../src/gcc/toplev.c:327 0x7fb38e75951f ??? ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0 0x7dd197 finish_static_assert(tree_node*, tree_node*, unsigned int, bool, b= ool) ../../src/gcc/cp/semantics.c:10134 0x15089c8 cp_parser_static_assert ../../src/gcc/cp/parser.c:15464 0xf9ed91 cp_parser_declaration ../../src/gcc/cp/parser.c:14164 0x149bba3 cp_parser_toplevel_declaration ../../src/gcc/cp/parser.c:14193 0x149bba3 cp_parser_translation_unit ../../src/gcc/cp/parser.c:4942 0x149bba3 c_parse_file() ../../src/gcc/cp/parser.c:45326 0x1489a5e c_common_parse_file() ../../src/gcc/c-family/c-opts.c:1218 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. $ g++ --version g++ (Ubuntu 11.2.0-7ubuntu2) 11.2.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.=