public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "zhendong.su at inf dot ethz.ch" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108582] New: ICE on valid code at -Os and above with "-fno-tree-ccp -fno-tree-dce": tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.cc:87 Date: Sat, 28 Jan 2023 13:48:17 +0000 [thread overview] Message-ID: <bug-108582-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108582 Bug ID: 108582 Summary: ICE on valid code at -Os and above with "-fno-tree-ccp -fno-tree-dce": tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.cc:87 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zhendong.su at inf dot ethz.ch Target Milestone: --- It appears to be a recent regression from 12.2. Compiler Explorer: https://godbolt.org/z/91oGh1W8K [617] % gcctk -v Using built-in specs. COLLECT_GCC=gcctk COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/13.0.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-trunk/configure --disable-bootstrap --enable-checking=yes --prefix=/local/suz-local/software/local/gcc-trunk --enable-sanitizers --enable-languages=c,c++ --disable-werror --disable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 13.0.1 20230128 (experimental) [master r12-4647-g3f861a5c8fd] (GCC) [618] % [618] % gcctk -O3 small.c; ./a.out [619] % [619] % gcctk -O3 -fno-tree-ccp -fno-tree-dce small.c during GIMPLE pass: phiopt small.c: In function ‘main’: small.c:3:5: internal compiler error: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.cc:87 3 | int main() { | ^~~~ 0x6e9981 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc-trunk/gcc/tree.cc:8959 0xbad6e3 tree_class_check(tree_node*, tree_code_class, char const*, int, char const*) ../../gcc-trunk/gcc/tree.h:3653 0xbad6e3 useless_type_conversion_p(tree_node*, tree_node*) ../../gcc-trunk/gcc/gimple-expr.cc:87 0xfb106c verify_gimple_assign_binary ../../gcc-trunk/gcc/tree-cfg.cc:4292 0xfc1897 verify_gimple_assign ../../gcc-trunk/gcc/tree-cfg.cc:4829 0xfc1897 verify_gimple_stmt ../../gcc-trunk/gcc/tree-cfg.cc:5088 0xfc9448 verify_gimple_in_cfg(function*, bool, bool) ../../gcc-trunk/gcc/tree-cfg.cc:5583 0xe5a333 execute_function_todo ../../gcc-trunk/gcc/passes.cc:2091 0xe5adb2 execute_todo ../../gcc-trunk/gcc/passes.cc:2145 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. [620] % [620] % cat small.c int a, c, d, e, f; char b; int main() { int g = 1; char h[1] = {0}; while (a) { if (f) { b = 0; if (d) continue; } if (a < 1) { g = 0; goto L; } } while (c) { char *j = h; int k; L: if (e && !g) k |= 2 | (*j < 0); } return 0; }
next reply other threads:[~2023-01-28 13:48 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-01-28 13:48 zhendong.su at inf dot ethz.ch [this message] 2023-01-28 18:10 ` [Bug tree-optimization/108582] [13 Regression] " pinskia at gcc dot gnu.org 2023-01-28 18:12 ` pinskia at gcc dot gnu.org 2023-01-28 18:12 ` pinskia at gcc dot gnu.org 2023-01-28 18:17 ` pinskia at gcc dot gnu.org 2023-01-28 18:50 ` [Bug tree-optimization/108582] [12/13 " pinskia at gcc dot gnu.org 2023-01-28 22:25 ` pinskia at gcc dot gnu.org 2023-01-30 8:31 ` rguenth at gcc dot gnu.org 2023-01-30 12:46 ` cvs-commit at gcc dot gnu.org 2023-01-30 12:47 ` [Bug tree-optimization/108582] [12 " pinskia at gcc dot gnu.org 2023-02-07 20:21 ` cvs-commit at gcc dot gnu.org 2023-02-07 20:22 ` pinskia 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-108582-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).