public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "msebor at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/101219] [12 Regression] ice in perform_or_defer_access_check since r12-1804-g65870e75616ee435 Date: Mon, 28 Jun 2021 20:00:42 +0000 [thread overview] Message-ID: <bug-101219-4-3WN3vM0tLQ@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-101219-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101219 --- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- The code fails in the assert below where binfo is null. The full stack trace follows. The difference is that before r12-1804 warn_for_null_address() would return without doing anything because TREE_NO_WARNING(op) was 1. r12-1804 changed the TREE_NO_WARNING(op) test to warning_suppressed_p (op, OPT_Waddress)) which returns false. The no-warning bit on OP is also clear so something has caused it to not be set. Possibly a subtle difference in the location value. Whatever has caused the change, it seems like the root cause of the ICE is something else (unless the front end somehow relies on the no-warning bit to also mean something else than just "disable warnings"). bool perform_or_defer_access_check (tree binfo, tree decl, tree diag_decl, tsubst_flags_t complain, access_failure_info *afi) { int i; deferred_access *ptr; deferred_access_check *chk; /* Exit if we are in a context that no access checking is performed. */ if (deferred_access_no_check) return true; gcc_assert (TREE_CODE (binfo) == TREE_BINFO); 0x1717bc8 crash_signal /ssd/src/gcc/master/gcc/toplev.c:328 0xdf00fb perform_or_defer_access_check(tree_node*, tree_node*, tree_node*, int, access_failure_info*) /ssd/src/gcc/master/gcc/cp/semantics.c:490 0xdf6a7d finish_non_static_data_member(tree_node*, tree_node*, tree_node*) /ssd/src/gcc/master/gcc/cp/semantics.c:2208 0xda8762 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) /ssd/src/gcc/master/gcc/cp/pt.c:20568 0xd5d6cc instantiate_non_dependent_expr_internal(tree_node*, int) /ssd/src/gcc/master/gcc/cp/pt.c:6323 0xad622f fold_non_dependent_expr_template /ssd/src/gcc/master/gcc/cp/constexpr.c:7604 0xad6585 fold_non_dependent_expr(tree_node*, int, bool, tree_node*) /ssd/src/gcc/master/gcc/cp/constexpr.c:7661 0xbda7c4 fold_for_warn(tree_node*) /ssd/src/gcc/master/gcc/cp/expr.c:409 0xe67e56 warn_for_null_address /ssd/src/gcc/master/gcc/cp/typeck.c:4453 0xe6a880 cp_build_binary_op(op_location_t const&, tree_code, tree_node*, tree_node*, int) /ssd/src/gcc/master/gcc/cp/typeck.c:5169 0xe6b0ff cp_build_binary_op(op_location_t const&, tree_code, tree_node*, tree_node*, int) /ssd/src/gcc/master/gcc/cp/typeck.c:5357 0xa59d4c build_new_op_1 /ssd/src/gcc/master/gcc/cp/call.c:6760 0xa59e57 build_new_op(op_location_t const&, tree_code, int, tree_node*, tree_node*, tree_node*, tree_node**, int) /ssd/src/gcc/master/gcc/cp/call.c:6806 0xe6774c build_x_binary_op(op_location_t const&, tree_code, tree_node*, tree_code, tree_node*, tree_code, tree_node**, int) /ssd/src/gcc/master/gcc/cp/typeck.c:4330 0xcd6d2c cp_parser_binary_expression /ssd/src/gcc/master/gcc/cp/parser.c:10023 0xcd7229 cp_parser_assignment_expression /ssd/src/gcc/master/gcc/cp/parser.c:10163 0xcd7608 cp_parser_expression /ssd/src/gcc/master/gcc/cp/parser.c:10331 0xcdb75c cp_parser_expression_statement /ssd/src/gcc/master/gcc/cp/parser.c:12075 0xcdafe1 cp_parser_statement /ssd/src/gcc/master/gcc/cp/parser.c:11871 0xcdbd17 cp_parser_statement_seq_opt /ssd/src/gcc/master/gcc/cp/parser.c:12223
next prev parent reply other threads:[~2021-06-28 20:00 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-26 8:57 [Bug c++/101219] New: ice in perform_or_defer_access_check dcb314 at hotmail dot com 2021-06-26 9:01 ` [Bug c++/101219] " dcb314 at hotmail dot com 2021-06-28 7:25 ` [Bug c++/101219] [12 Regression] ice in perform_or_defer_access_check since r12-1804-g65870e75616ee435 marxin at gcc dot gnu.org 2021-06-28 20:00 ` msebor at gcc dot gnu.org [this message] 2021-07-19 21:26 ` slyfox at gcc dot gnu.org 2021-07-19 21:47 ` slyfox at gcc dot gnu.org 2021-07-20 23:16 ` slyfox at gcc dot gnu.org 2021-07-21 0:06 ` msebor at gcc dot gnu.org 2021-07-22 23:20 ` slyfox at gcc dot gnu.org 2021-08-12 18:44 ` cvs-commit at gcc dot gnu.org 2021-08-12 18:46 ` slyfox at gcc dot gnu.org 2021-11-03 18:53 ` ppalka 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-101219-4-3WN3vM0tLQ@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).