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++/95728] [11 Regression] tree check: expected tree_list, have error_mark in tsubst_copy_and_build, at cp/pt.c:19594 Date: Thu, 18 Jun 2020 12:33:17 +0000 [thread overview] Message-ID: <bug-95728-4-8eoZU10dzz@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-95728-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95728 --- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>: https://gcc.gnu.org/g:81caacc273399c91ae3182021ad87bc2ba786039 commit r11-1507-g81caacc273399c91ae3182021ad87bc2ba786039 Author: Marek Polacek <polacek@redhat.com> Date: Wed Jun 17 19:23:10 2020 -0400 c++: Fix tsubst ICE with invalid static_cast [PR95728] Since r11-423 tsubst_copy_and_build/TREE_LIST uses tsubst_tree_list instead of open coding it. While the latter could return an error node wrapped in a TREE_LIST, the former can return a naked error node. That broke in tsubst_copy_and_build/NEW_EXPR: tree placement = RECUR (TREE_OPERAND (t, 0)); // placement is now error_mark_node, so... for (; placement != NULL_TREE; placement = TREE_CHAIN (placement)) // ... this crashes If we just return, we avoid the ICE and improve the diagnostic a bit. gcc/cp/ChangeLog: PR c++/95728 * pt.c (tsubst_copy_and_build) <case NEW_EXPR>: Return error_mark_node if placement is erroneous. gcc/testsuite/ChangeLog: PR c++/95728 * g++.dg/template/cast6.C: New test.
next prev parent reply other threads:[~2020-06-18 12:33 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-17 19:41 [Bug c++/95728] New: " redi at gcc dot gnu.org 2020-06-17 19:41 ` [Bug c++/95728] " redi at gcc dot gnu.org 2020-06-17 23:16 ` mpolacek at gcc dot gnu.org 2020-06-17 23:20 ` mpolacek at gcc dot gnu.org 2020-06-18 12:33 ` cvs-commit at gcc dot gnu.org [this message] 2020-06-18 12:35 ` 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-95728-4-8eoZU10dzz@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).