From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BFD6B3858D28; Tue, 17 Jan 2023 17:53:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BFD6B3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673978014; bh=MH/QtcVr14RanJgreXwE+UBjGcilpG2eCYELEWHlsmE=; h=From:To:Subject:Date:From; b=w+ONbEZ6trc/OwxJCaXVWU8ZstCUUcQFOn+GCGzyzD8J9Gt+piUm9A7W6lnHa2A3X Ms8NAmos2CmkJzNYOVlFWGLauZGlYrqI1BYgbsu87Q9sh5662DByxTv8qaR0AqKIAT 1XoxlAT1cQCnoDsA2iDfbhQYNF+7NRY37xXlQ1T8= From: "gscfq@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108438] New: [10/11/12/13 Regression] ICE in cxx_eval_constant_expression, at cp/constexpr.cc:7611 Date: Tue, 17 Jan 2023 17:53:34 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gscfq@t-online.de 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 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=3D108438 Bug ID: 108438 Summary: [10/11/12/13 Regression] ICE in cxx_eval_constant_expression, at cp/constexpr.cc:7611 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gscfq@t-online.de Target Milestone: --- Started with r6 and -Wall : $ cat z1.cc template T foo (T arg, T& ref, T* ptr) { int a =3D 1; return static_cast(a); } $ g++-13-20230115 -c z1.cc -Wall z1.cc: In function 'T foo(T, T&, T*)': z1.cc:5:23: error: expected '>' before '!' token 5 | return static_cast(a); | ^ z1.cc:5:23: error: expected '(' before '!' token 5 | return static_cast(a); | ^ | ( z1.cc:5:24: error: expected primary-expression before '>' token 5 | return static_cast(a); | ^ z1.cc:5:27: internal compiler error: in cxx_eval_constant_expression, at cp/constexpr.cc:7611 5 | return static_cast(a); | ^ 0x883b61 cxx_eval_constant_expression ../../gcc/cp/constexpr.cc:7611 0x88c97a cxx_eval_outermost_constant_expr ../../gcc/cp/constexpr.cc:8252 0x891e42 maybe_constant_value(tree_node*, tree_node*, bool) ../../gcc/cp/constexpr.cc:8527 0xa11806 cp_parser_binary_expression ../../gcc/cp/parser.cc:10233 0xa11da4 cp_parser_assignment_expression ../../gcc/cp/parser.cc:10444 0xa14362 cp_parser_expression ../../gcc/cp/parser.cc:10614 0xa2b843 cp_parser_postfix_expression ../../gcc/cp/parser.cc:7356 0xa44ddf cp_parser_unary_expression ../../gcc/cp/parser.cc:9095 0xa106ef cp_parser_cast_expression ../../gcc/cp/parser.cc:9999 0xa1101f cp_parser_binary_expression ../../gcc/cp/parser.cc:10101 0xa11da4 cp_parser_assignment_expression ../../gcc/cp/parser.cc:10444 0xa14362 cp_parser_expression ../../gcc/cp/parser.cc:10614 0xa27806 cp_parser_jump_statement ../../gcc/cp/parser.cc:14359 0xa27806 cp_parser_statement ../../gcc/cp/parser.cc:12335 0xa27de4 cp_parser_statement_seq_opt ../../gcc/cp/parser.cc:12909 0xa27ec7 cp_parser_compound_statement ../../gcc/cp/parser.cc:12861 0xa51d90 cp_parser_function_body ../../gcc/cp/parser.cc:25280 0xa51d90 cp_parser_ctor_initializer_opt_and_function_body ../../gcc/cp/parser.cc:25331 0xa5240a cp_parser_function_definition_after_declarator ../../gcc/cp/parser.cc:31953 0xa5393c cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/cp/parser.cc:31870=