public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/100079] [9/10/11 Regression] Non-type template parameter, itself a nested template, rejected with internal error Date: Fri, 16 Apr 2021 05:17:21 +0000 [thread overview] Message-ID: <bug-100079-4-C2nq80Mejt@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-100079-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100079 --- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>: https://gcc.gnu.org/g:89c863488bc8c7315596bcb753173aa2fd8be727 commit r11-8207-g89c863488bc8c7315596bcb753173aa2fd8be727 Author: Jason Merrill <jason@redhat.com> Date: Wed Apr 14 17:27:19 2021 -0400 c++: C++20 class NTTP trailing zero-init [PR100079] The new testcase was breaking because constexpr evaluation was simplifying Bar{Baz<42>{}} to Bar{empty}, but then we weren't treating them as equivalent. Poking at this revealed that the code for eliding trailing zero-initialization in class non-type template argument mangling was pretty broken, including the test, mangle71. I dealt with the FIXME to support RANGE_EXPR, and fixed the confusion between a list-initialized temporary mangled as written (i.e. in the signature of a function template) and a template parameter object mangled as the value representation of the object. I'm distinguishing between these using COMPOUND_LITERAL_P. A later patch will adjust the use of COMPOUND_LITERAL_P to be more useful for this distinction, but it works now for distinguishing these cases in mangling. gcc/cp/ChangeLog: PR c++/100079 * cp-tree.h (first_field): Declare. * mangle.c (range_expr_nelts): New. (write_expression): Improve class NTTP mangling. * pt.c (get_template_parm_object): Clear TREE_HAS_CONSTRUCTOR. * tree.c (zero_init_expr_p): Improve class NTTP handling. * decl.c: Adjust comment. gcc/testsuite/ChangeLog: PR c++/100079 * g++.dg/abi/mangle71.C: Fix expected mangling. * g++.dg/abi/mangle77.C: New test. * g++.dg/cpp2a/nontype-class-union1.C: Likewise. * g++.dg/cpp2a/nontype-class-equiv1.C: Removed. * g++.dg/cpp2a/nontype-class44.C: New test.
next prev parent reply other threads:[~2021-04-16 5:17 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-14 12:54 [Bug c++/100079] New: " mail at lboeger dot de 2021-04-14 13:18 ` [Bug c++/100079] [9/10/11 Regression] " jakub at gcc dot gnu.org 2021-04-14 13:24 ` jakub at gcc dot gnu.org 2021-04-14 16:54 ` mail at lboeger dot de 2021-04-14 21:33 ` jason at gcc dot gnu.org 2021-04-16 5:17 ` cvs-commit at gcc dot gnu.org [this message] 2021-04-16 14:05 ` [Bug c++/100079] [9/10 " jason at gcc dot gnu.org 2021-04-20 18:53 ` mail at lboeger dot de 2021-06-01 8:20 ` rguenth at gcc dot gnu.org 2022-05-13 15:21 ` jason 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-100079-4-C2nq80Mejt@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).