public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/109618] [12/13/14 Regression] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in generic_simplify_CONVERT_EXPR, at generic-match.cc since r12-3278-g823685221de986 Date: Sat, 23 Mar 2024 20:38:02 +0000 [thread overview] Message-ID: <bug-109618-4-SYfYlCqLYK@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-109618-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109618 --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- This one seems harder to fix. We have: ``` (gdb) p debug_tree(value) <nop_expr 0x7ffff79ad5c0 type <integer_type 0x7ffff7822000 sizetype public unsigned DI size <integer_cst 0x7ffff7802f48 constant 64> unit-size <integer_cst 0x7ffff7802f60 constant 8> align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff7822000 precision:64 min <integer_cst 0x7ffff7802f78 0> max <integer_cst 0x7ffff78035e0 18446744073709551615>> readonly arg:0 <var_decl 0x7ffff7810c60 var_1 type <error_mark 0x7ffff7802f30> readonly used unsigned read SI t2.c:3:22 size <integer_cst 0x7ffff7824198 constant 32> unit-size <integer_cst 0x7ffff78241b0 constant 4> align:32 warn_if_not_align:0 context <function_decl 0x7ffff79b3600 foo> initial <integer_cst 0x7ffff79bbbe8 2>>> ``` Before calling fold. So we turn var_1's type to error_mark when merging the 2 decls (after an error). But then the rest of the front-end/middle-end is still not ready for types all the time to have an error_mark. Note I don't think we should revert r12-3278 even though it has had a lot of fall out because it produces better error recovery in general. Note for this simplified testcase we could look through the NOP_EXPR in c_sizeof_alignof but a more complex one which does s/var_5[var_1]/var_5[13 * var_1]/, we can't as we get: (sizetype) ((unsigned int) var_1 * 13) And that one ICEs in tree_nonzero_bits. CASE_CONVERT: return wide_int::from (tree_nonzero_bits (TREE_OPERAND (t, 0)), TYPE_PRECISION (TREE_TYPE (t)), TYPE_SIGN (TREE_TYPE (TREE_OPERAND (t, 0))));
prev parent reply other threads:[~2024-03-23 20:38 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-04-25 5:53 [Bug c/109618] New: ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in generic_simplify_CONVERT_EXPR, at generic-match.cc anbu1024.me at gmail dot com 2023-04-25 6:37 ` [Bug c/109618] " rguenth at gcc dot gnu.org 2023-04-27 6:59 ` [Bug c/109618] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in generic_simplify_CONVERT_EXPR, at generic-match.cc since r12-3278-g823685221de986 marxin at gcc dot gnu.org 2024-03-23 20:27 ` [Bug c/109618] [12/13/14 Regression] " pinskia at gcc dot gnu.org 2024-03-23 20:38 ` pinskia at gcc dot gnu.org [this message]
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-109618-4-SYfYlCqLYK@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).