public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "acoplan at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/106878] New: ICE: verify_gimple failed at -O2 on arm-none-eabi
Date: Wed, 07 Sep 2022 17:28:54 +0000	[thread overview]
Message-ID: <bug-106878-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106878

            Bug ID: 106878
           Summary: ICE: verify_gimple failed at -O2 on arm-none-eabi
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

The following fails for GCC 11 and above (indeed still on the trunk):

$ gcc/xgcc -B gcc -v
Reading specs from gcc/specs
COLLECT_GCC=gcc/xgcc
COLLECT_LTO_WRAPPER=gcc/lto-wrapper
Target: arm-none-eabi
Configured with: /home/alecop01/toolchain/src/gcc/configure
--prefix=/data_sdb/toolchain/cc1s/dbg-arm --enable-languages=c,c++
--disable-bootstrap --target=arm-none-eabi
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 13.0.0 20220907 (experimental) (GCC)

$ cat t.c
int a;
void b(const int *c) {
  unsigned d = ((long)c | (long)&a) & 65535 << 16;
  long e = (long)c;
  if (d != (e & 65535 << 16))
    return;
}

$ gcc/xgcc -B gcc -c t.c -O2 -S -o /dev/null
t.c: In function ‘b’:
t.c:7:1: error: invalid types for ‘bit_not_expr’
    7 | }
      | ^
const int *
const int *
_12 = ~c_7(D);
during GIMPLE pass: forwprop
t.c:7:1: internal compiler error: verify_gimple failed
0xe0c855 verify_gimple_in_cfg(function*, bool)
        /home/alecop01/toolchain/src/gcc/gcc/tree-cfg.cc:5568
0xca78be execute_function_todo
        /home/alecop01/toolchain/src/gcc/gcc/passes.cc:2091
0xca8342 execute_todo
        /home/alecop01/toolchain/src/gcc/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.

$ gcc/xgcc -B gcc -c t.c -O2 -S -o /dev/null -fno-checking
during GIMPLE pass: evrp
t.c: In function ‘b’:
t.c:7:1: internal compiler error: Segmentation fault
    7 | }
      | ^
0xdb06ef crash_signal
        /home/alecop01/toolchain/src/gcc/gcc/toplev.cc:314
0x1a70ca1 range_op_handler::fold_range(vrange&, tree_node*, vrange const&,
vrange const&, relation_kind_t) const
        /home/alecop01/toolchain/src/gcc/gcc/range-op.cc:4217
0x1a755cb operator_bitwise_not::fold_range(irange&, tree_node*, irange const&,
irange const&, relation_kind_t) const
        /home/alecop01/toolchain/src/gcc/gcc/range-op.cc:3507
0x1948cd7 fold_using_range::range_of_range_op(vrange&, gimple*, fur_source&)
        /home/alecop01/toolchain/src/gcc/gcc/gimple-range-fold.cc:611
0x194ae68 fold_using_range::fold_stmt(vrange&, gimple*, fur_source&,
tree_node*)
        /home/alecop01/toolchain/src/gcc/gcc/gimple-range-fold.cc:555
0x19358ec gimple_ranger::fold_range_internal(vrange&, gimple*, tree_node*)
        /home/alecop01/toolchain/src/gcc/gcc/gimple-range.cc:258
0x19371f0 gimple_ranger::range_of_stmt(vrange&, gimple*, tree_node*)
        /home/alecop01/toolchain/src/gcc/gcc/gimple-range.cc:319
0x113ec83 range_query::value_of_stmt(gimple*, tree_node*)
        /home/alecop01/toolchain/src/gcc/gcc/value-query.cc:135
0xfcda70 substitute_and_fold_dom_walker::before_dom_children(basic_block_def*)
        /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-propagate.cc:816
0x18f9e47 dom_walker::walk(basic_block_def*)
        /home/alecop01/toolchain/src/gcc/gcc/domwalk.cc:311
0xfcc8b5 substitute_and_fold_engine::substitute_and_fold(basic_block_def*)
        /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-propagate.cc:987
0x10f3430 execute_ranger_vrp(function*, bool)
        /home/alecop01/toolchain/src/gcc/gcc/tree-vrp.cc:4349
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.

             reply	other threads:[~2022-09-07 17:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07 17:28 acoplan at gcc dot gnu.org [this message]
2022-09-07 17:39 ` [Bug tree-optimization/106878] [11/12/13 Regression] " pinskia at gcc dot gnu.org
2022-09-07 19:00 ` [Bug tree-optimization/106878] [11/12/13 Regression] ICE: verify_gimple failed at -O2 with pointers and bitwise caluclation acoplan at gcc dot gnu.org
2022-09-07 19:02 ` jakub at gcc dot gnu.org
2022-09-08  9:34 ` rguenth at gcc dot gnu.org
2022-09-08 13:38 ` jakub at gcc dot gnu.org
2022-09-08 13:58 ` jakub at gcc dot gnu.org
2022-09-08 14:00 ` jakub at gcc dot gnu.org
2022-09-08 14:05 ` jakub at gcc dot gnu.org
2022-09-13  8:29 ` jakub at gcc dot gnu.org
2022-09-14 10:37 ` cvs-commit at gcc dot gnu.org
2022-10-31 18:54 ` pinskia at gcc dot gnu.org
2022-10-31 18:55 ` pinskia at gcc dot gnu.org
2022-11-25 15:22 ` [Bug tree-optimization/106878] [11/12 Regression] ICE: verify_gimple failed at -O2 with pointers and bitwise calculation jakub at gcc dot gnu.org
2023-01-09 12:33 ` marxin at gcc dot gnu.org
2023-01-10  0:28 ` vvinayag at arm dot com
2023-04-27 12:01 ` rguenth at gcc dot gnu.org
2023-04-27 12:04 ` jakub at gcc dot gnu.org
2023-05-13  8:13 ` pinskia at gcc dot gnu.org
2023-05-29 10:07 ` jakub at gcc dot gnu.org
2023-10-19 13:56 ` acoplan at gcc dot gnu.org
2023-10-20  9:15 ` acoplan 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-106878-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: link
Be 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).