public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/108819] New: ICE on valid code at -O1 with "-fno-tree-ccp -fno-tree-forwprop" on x86_64-linux-gnu: tree check: expected ssa_name, have integer_cst in number_of_iterations_cltz, at tree-ssa-loop-niter.cc:2394
@ 2023-02-16 10:35 zhendong.su at inf dot ethz.ch
  2023-02-16 15:39 ` [Bug tree-optimization/108819] [13 Regression] " pinskia at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2023-02-16 10:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108819
           Summary: ICE on valid code at -O1 with "-fno-tree-ccp
                    -fno-tree-forwprop" on x86_64-linux-gnu: tree check:
                    expected ssa_name, have integer_cst in
                    number_of_iterations_cltz, at
                    tree-ssa-loop-niter.cc:2394
           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. 

Compiler Explorer: https://godbolt.org/z/a7zzhcxhz

[570] % 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 --enable-multilib
--with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.0.1 20230216 (experimental) [master r13-6073-g441c466fd4d] (GCC)
[571] %
[571] % gcctk -O1 small.c; ./a.out
[572] %
[572] % gcctk -O1 -fno-tree-ccp -fno-tree-forwprop small.c
during GIMPLE pass: ivcanon
small.c: In function ‘main’:
small.c:2:5: internal compiler error: tree check: expected ssa_name, have
integer_cst in number_of_iterations_cltz, at tree-ssa-loop-niter.cc:2394
    2 | int main() {
      |     ^~~~
0x7a8f41 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc-trunk/gcc/tree.cc:8909
0x78196d tree_check(tree_node*, char const*, int, char const*, tree_code)
        ../../gcc-trunk/gcc/tree.h:3530
0x78196d number_of_iterations_cltz
        ../../gcc-trunk/gcc/tree-ssa-loop-niter.cc:2394
0x10838e2 number_of_iterations_exit_assumptions(loop*, edge_def*,
tree_niter_desc*, gcond**, bool, basic_block_def**)
        ../../gcc-trunk/gcc/tree-ssa-loop-niter.cc:3287
0x10838e2 number_of_iterations_exit(loop*, edge_def*, tree_niter_desc*, bool,
bool, basic_block_def**)
        ../../gcc-trunk/gcc/tree-ssa-loop-niter.cc:3274
0x1083e08 estimate_numbers_of_iterations(loop*)
        ../../gcc-trunk/gcc/tree-ssa-loop-niter.cc:4844
0x1086685 estimate_numbers_of_iterations(function*)
        ../../gcc-trunk/gcc/tree-ssa-loop-niter.cc:5072
0x105aad6 canonicalize_induction_variables()
        ../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1293
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.
[573] %
[573] % cat small.c
int a, b;
int main() {
  int d = 1;
  for (; b; b++)
    if (a < 1)
      while (d <= a && a <= 0UL) {
        int *e = &d;
        *e = 0;
      }
  return 0;
}

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

end of thread, other threads:[~2023-03-20 10:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-16 10:35 [Bug tree-optimization/108819] New: ICE on valid code at -O1 with "-fno-tree-ccp -fno-tree-forwprop" on x86_64-linux-gnu: tree check: expected ssa_name, have integer_cst in number_of_iterations_cltz, at tree-ssa-loop-niter.cc:2394 zhendong.su at inf dot ethz.ch
2023-02-16 15:39 ` [Bug tree-optimization/108819] [13 Regression] " pinskia at gcc dot gnu.org
2023-02-16 19:34 ` [Bug tree-optimization/108819] [12/13 " pinskia at gcc dot gnu.org
2023-02-17  7:59 ` rguenth at gcc dot gnu.org
2023-02-17 13:20 ` rguenth at gcc dot gnu.org
2023-02-17 16:46 ` jakub at gcc dot gnu.org
2023-02-18 11:41 ` cvs-commit at gcc dot gnu.org
2023-02-18 11:42 ` [Bug tree-optimization/108819] [12 " jakub at gcc dot gnu.org
2023-02-20  7:44 ` cvs-commit at gcc dot gnu.org
2023-03-19  5:29 ` cvs-commit at gcc dot gnu.org
2023-03-20 10:26 ` jakub at gcc dot gnu.org

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