public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "haoxintu at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/100349] New: [11/12 Regression] ICE Segmentation fault during GIMPLE pass: evrp (under -O2 to -Os) Date: Fri, 30 Apr 2021 08:26:37 +0000 [thread overview] Message-ID: <bug-100349-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100349 Bug ID: 100349 Summary: [11/12 Regression] ICE Segmentation fault during GIMPLE pass: evrp (under -O2 to -Os) Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- Hi, all. $cat small.c #include <stdint.h> uint8_t a; b(int8_t c) { int d; e: uint32_t f; for (;;) for (c = 10; c; c++) if (0 > (a = c) ?: d) { f = a; goto e; } } $gcc -w -O2 small.c during GIMPLE pass: evrp small.c: In function ‘b’: small.c:13:1: internal compiler error: Segmentation fault 13 | } | ^ 0xb9ec1f crash_signal ../../gcc/toplev.c:327 0xe5a92b bounds_of_var_in_loop(tree_node**, tree_node**, range_query*, loop*, gimple*, tree_node*) ../../gcc/vr-values.c:1658 0x146fa91 gimple_ranger::range_of_ssa_name_with_loop_info(irange&, tree_node*, loop*, gphi*) ../../gcc/gimple-range.cc:1220 0x146fd83 gimple_ranger::range_of_phi(irange&, gphi*) ../../gcc/gimple-range.cc:568 0x147017d gimple_ranger::calc_stmt(irange&, gimple*, tree_node*) ../../gcc/gimple-range.cc:376 0x14704a1 gimple_ranger::range_of_stmt(irange&, gimple*, tree_node*) ../../gcc/gimple-range.cc:1068 0x146c040 gimple_ranger::range_of_expr(irange&, tree_node*, gimple*) ../../gcc/gimple-range.cc:960 0xe1a0e1 range_query::value_of_expr(tree_node*, gimple*) ../../gcc/value-query.cc:86 0x147a6f1 hybrid_folder::value_of_expr(tree_node*, gimple*) ../../gcc/gimple-ssa-evrp.c:235 0xcf836d substitute_and_fold_dom_walker::before_dom_children(basic_block_def*) ../../gcc/tree-ssa-propagate.c:1072 0x14482d7 dom_walker::walk(basic_block_def*) ../../gcc/domwalk.c:309 0xcf7a35 substitute_and_fold_engine::substitute_and_fold(basic_block_def*) ../../gcc/tree-ssa-propagate.c:1283 0x147a366 execute_early_vrp ../../gcc/gimple-ssa-evrp.c:349 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. $gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/home/tuhaoxin/compilers/gcc/build-20210425/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../configure --prefix=/home/tuhaoxin/compilers/gcc/build-20210425/ --enable-bootstrap --enable-checking=release --enable-languages=c,c++ --enable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.0 20210425 (experimental) (GCC) This issue may start from one of the commits in GCC-11, and it's performed well in released GCC-10.3.0 downwards versions. Another weird behavior is that this code is accepted under -O1 in GCC-11 and GCC-12 while rejected in other released GCC versions. I guess there might be a problem here? Reproduced in Godbolt: https://godbolt.org/z/E7K9Ghjcc Thanks Haoxin
next reply other threads:[~2021-04-30 8:26 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-30 8:26 haoxintu at gmail dot com [this message] 2021-04-30 12:01 ` [Bug tree-optimization/100349] " rguenth at gcc dot gnu.org 2021-04-30 14:35 ` aldyh at gcc dot gnu.org 2021-05-13 0:06 ` tlwang at uwaterloo dot ca 2021-05-14 20:17 ` aldyh at gcc dot gnu.org 2021-05-17 16:19 ` cvs-commit at gcc dot gnu.org 2021-07-16 14:11 ` [Bug tree-optimization/100349] [11 " amacleod at redhat dot com
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-100349-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).