public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/97520] New: ICE in calc_stmt, at gimple-range.cc:399 with "-O1 -fno-tree-fre -ftree-vrp"
@ 2020-10-21 15:23 suochenyao at 163 dot com
  2020-10-21 18:26 ` [Bug tree-optimization/97520] " amacleod at redhat dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: suochenyao at 163 dot com @ 2020-10-21 15:23 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97520
           Summary: ICE in calc_stmt, at gimple-range.cc:399 with "-O1
                    -fno-tree-fre -ftree-vrp"
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: suochenyao at 163 dot com
  Target Milestone: ---

*******************************************************************************
OS and Platform:
CentOS Linux release 7.8.2003 (Core), x86_64 GNU/Linux
*******************************************************************************
Program:
char a;
void b() {
  char *c[5];
  char *d = &a;
  &d;
  *(c[4] = d);
}
int main() { return 0; }
*******************************************************************************
gcc version:
$ gcc -v
Using built-in specs.
COLLECT_GCC=/home/suocy/bin/gcc-dev/bin/gcc
COLLECT_LTO_WRAPPER=/home/suocy/bin/gcc-dev/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/home/suocy/bin/gcc-dev
--disable-multilib --enable-languages=c,c++
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20201020 (experimental) (GCC)
*******************************************************************************
Command Lines:
$ gcc -Wall -Wextra -fno-strict-aliasing -fwrapv -O1 -fno-tree-fre -ftree-vrp
a.c
a.c: In function ‘b’:
a.c:5:3: warning: statement with no effect [-Wunused-value]
    5 |   &d;
      |   ^~
a.c:6:3: warning: value computed is not used [-Wunused-value]
    6 |   *(c[4] = d);
      |   ^~~~~~~~~~~
during GIMPLE pass: evrp
a.c:8:1: internal compiler error: in calc_stmt, at gimple-range.cc:399
    8 | int main() { return 0; }
      | ^~~
0x7f6095 gimple_ranger::calc_stmt(irange&, gimple*, tree_node*)
        ../../gcc/gimple-range.cc:399
0x188dc5f gimple_ranger::range_of_stmt(irange&, gimple*, tree_node*)
        ../../gcc/gimple-range.cc:992
0x188a498 gimple_ranger::range_of_expr(irange&, tree_node*, gimple*)
        ../../gcc/gimple-range.cc:883
0x10a236d range_query::value_of_expr(tree_node*, gimple*)
        ../../gcc/value-query.cc:85
0x172bc71 hybrid_folder::value_of_expr(tree_node*, gimple*)
        ../../gcc/gimple-ssa-evrp.c:235
0xf5c73e substitute_and_fold_dom_walker::before_dom_children(basic_block_def*)
        ../../gcc/tree-ssa-propagate.c:1112
0x1703777 dom_walker::walk(basic_block_def*)
        ../../gcc/domwalk.c:309
0xf5b955 substitute_and_fold_engine::substitute_and_fold(basic_block_def*)
        ../../gcc/tree-ssa-propagate.c:1283
0x172b8e6 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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-10-30 15:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-21 15:23 [Bug c/97520] New: ICE in calc_stmt, at gimple-range.cc:399 with "-O1 -fno-tree-fre -ftree-vrp" suochenyao at 163 dot com
2020-10-21 18:26 ` [Bug tree-optimization/97520] " amacleod at redhat dot com
2020-10-21 18:34 ` marxin at gcc dot gnu.org
2020-10-21 18:35 ` marxin at gcc dot gnu.org
2020-10-22  0:16 ` cvs-commit at gcc dot gnu.org
2020-10-22  7:03 ` rguenth at gcc dot gnu.org
2020-10-30 15:25 ` suochenyao at 163 dot com
2020-10-30 15:27 ` suochenyao at 163 dot com

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).