From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 81DCA3887018; Tue, 14 Apr 2020 10:44:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 81DCA3887018 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1586861071; bh=xbvGi8PdbrhVnpaKacPTJ/3b5tLEIeJP1NzlTHf4Q7Y=; h=From:To:Subject:Date:From; b=ZGN3cHNtAPhrmuk82C4DCyWCczR1l+mb+ATa+zYW8ql7Oo4yH6RhRyuRK6dZoWeIo wGhlnTA+H3kaBIL9/rHxqnc4YhL06yC0RTh+rXcksfXZFlz91CMdyrYz8bCFaP6NK1 S89YhnZ0AVPwImdMTbKbxJIiORfr7S0LNw4KHuJc= From: "pacoarjonilla at yahoo dot es" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94592] New: ICE in non-type template parameter with constexpr constructor Date: Tue, 14 Apr 2020 10:44:31 +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: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pacoarjonilla at yahoo dot es 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 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: Tue, 14 Apr 2020 10:44:31 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94592 Bug ID: 94592 Summary: ICE in non-type template parameter with constexpr constructor Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pacoarjonilla at yahoo dot es Target Milestone: --- GCC10 --std=3Dc++20 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> struct A { constexpr A() {} }; template struct B { }; template void bar () { B<{}> var; } void fu() { bar(); } >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> meta.cc: In instantiation of =E2=80=98struct B<((A)())>=E2=80=99: meta.cc:37:11: required from =E2=80=98void bar() [with =3D int]=E2=80=99 meta.cc:41:14: required from here meta.cc:34:23: internal compiler error: unexpected expression =E2=80=98(A)()=E2=80=99 of kind implicit_c= onv_expr 34 | template struct B { }; | ^ 0x8c3f37 cxx_eval_constant_expression /home/paco/git/gcc/gcc/cp/constexpr.c:6301 0x8c4366 cxx_eval_outermost_constant_expr /home/paco/git/gcc/gcc/cp/constexpr.c:6502 0x8c8654 maybe_constant_value(tree_node*, tree_node*, bool, bool) /home/paco/git/gcc/gcc/cp/constexpr.c:6774 0x9f860c convert_nontype_argument /home/paco/git/gcc/gcc/cp/pt.c:7099 0x9f860c convert_template_argument /home/paco/git/gcc/gcc/cp/pt.c:8331 0x9f9893 coerce_template_parms /home/paco/git/gcc/gcc/cp/pt.c:8810 0xa1bf61 lookup_template_class_1 /home/paco/git/gcc/gcc/cp/pt.c:9648 0xa1e363 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_nod= e*, int, int) /home/paco/git/gcc/gcc/cp/pt.c:10020 0xa1e363 tsubst_aggr_type /home/paco/git/gcc/gcc/cp/pt.c:13301 0xa0e44f tsubst_decl /home/paco/git/gcc/gcc/cp/pt.c:14294 0xa3079d instantiate_class_template_1 /home/paco/git/gcc/gcc/cp/pt.c:11748 0xa31ab2 instantiate_class_template(tree_node*) /home/paco/git/gcc/gcc/cp/pt.c:12007 0xa77ff9 complete_type(tree_node*) /home/paco/git/gcc/gcc/cp/typeck.c:137 0xa0e70b tsubst_decl /home/paco/git/gcc/gcc/cp/pt.c:14415 0xa063e0 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) /home/paco/git/gcc/gcc/cp/pt.c:17768 0xa0449e tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) /home/paco/git/gcc/gcc/cp/pt.c:17985 0xa01733 instantiate_decl(tree_node*, bool, bool) /home/paco/git/gcc/gcc/cp/pt.c:25509 0xa31d7b instantiate_pending_templates(int) /home/paco/git/gcc/gcc/cp/pt.c:25625 0x93b9f3 c_parse_final_cleanups() /home/paco/git/gcc/gcc/cp/decl2.c:4874 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.=