public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pacoarjonilla at yahoo dot es" <gcc-bugzilla@gcc.gnu.org> 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 [thread overview] Message-ID: <bug-94592-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94592 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=c++20 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> struct A { constexpr A() {} }; template <A> struct B { }; template<typename> void bar () { B<{}> var; } void fu() { bar<int>(); } >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> meta.cc: In instantiation of ‘struct B<((A)<brace-enclosed initializer list>())>’: meta.cc:37:11: required from ‘void bar() [with <template-parameter-1-1> = int]’ meta.cc:41:14: required from here meta.cc:34:23: internal compiler error: unexpected expression ‘(A)<brace-enclosed initializer list>()’ of kind implicit_conv_expr 34 | template <A> 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_node*, 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 <https://gcc.gnu.org/bugs/> for instructions.
next reply other threads:[~2020-04-14 10:44 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-14 10:44 pacoarjonilla at yahoo dot es [this message] 2020-04-14 10:49 ` [Bug c++/94592] " rguenth at gcc dot gnu.org 2020-04-14 11:16 ` marxin at gcc dot gnu.org 2020-04-14 11:41 ` pacoarjonilla at yahoo dot es 2020-04-14 14:32 ` mpolacek at gcc dot gnu.org 2020-04-14 16:29 ` mpolacek at gcc dot gnu.org 2020-04-14 16:38 ` pacoarjonilla at yahoo dot es 2020-04-15 17:57 ` [Bug c++/94592] [10 Regression] " mpolacek at gcc dot gnu.org 2020-04-18 3:43 ` mpolacek at gcc dot gnu.org 2020-04-20 13:57 ` rguenth at gcc dot gnu.org 2020-04-20 23:55 ` cvs-commit at gcc dot gnu.org 2020-04-20 23:55 ` mpolacek at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-94592-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).