public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/109115] New: ICE on valid code at -O2 and -O3 on x86_64-linux-gnu: in upper_bound, at value-range.h:950
@ 2023-03-13 20:19 zhendong.su at inf dot ethz.ch
  2023-03-13 20:23 ` [Bug tree-optimization/109115] [13 Regression] " pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2023-03-13 20:19 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109115
           Summary: ICE on valid code at -O2 and -O3 on x86_64-linux-gnu:
                    in upper_bound, at value-range.h:950
           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 as it does not reproduce with 12.2. 

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

[569] % 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 20230313 (experimental) [master r13-6641-g23532dac3f6] (GCC)
[570] %
[570] % gcctk -Os small.c; ./a.out
[571] %
[571] % gcctk -O2 small.c
during GIMPLE pass: slp
small.c: In function ‘main’:
small.c:2:5: internal compiler error: in upper_bound, at value-range.h:950
    2 | int main() {
      |     ^~~~
0xc48c63 irange::upper_bound() const
        ../../gcc-trunk/gcc/value-range.h:950
0xc48c63 irange::upper_bound() const
        ../../gcc-trunk/gcc/value-range.h:947
0x1e9e7ca vect_recog_divmod_pattern
        ../../gcc-trunk/gcc/tree-vect-patterns.cc:3978
0x1e9808a vect_pattern_recog_1
        ../../gcc-trunk/gcc/tree-vect-patterns.cc:6244
0x1e9d3c1 vect_pattern_recog(vec_info*)
        ../../gcc-trunk/gcc/tree-vect-patterns.cc:6401
0x11a97dc vect_slp_analyze_bb_1
        ../../gcc-trunk/gcc/tree-vect-slp.cc:7310
0x11a97dc vect_slp_region
        ../../gcc-trunk/gcc/tree-vect-slp.cc:7419
0x11abac3 vect_slp_bbs
        ../../gcc-trunk/gcc/tree-vect-slp.cc:7610
0x11abe9c vect_slp_function(function*)
        ../../gcc-trunk/gcc/tree-vect-slp.cc:7698
0x11b6492 execute
        ../../gcc-trunk/gcc/tree-vectorizer.cc:1532
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.
[572] %
[572] % cat small.c
int a, b;
int main() {
  unsigned short c = a, e = -1;
  if (b) {
    unsigned d = (a ^ 1U) / a & c;
    int f = (~d >> ~a) / e;
    if (a)
      f = a;
    a = f;
  }
  return 0;
}

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

end of thread, other threads:[~2023-03-14  8:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-13 20:19 [Bug tree-optimization/109115] New: ICE on valid code at -O2 and -O3 on x86_64-linux-gnu: in upper_bound, at value-range.h:950 zhendong.su at inf dot ethz.ch
2023-03-13 20:23 ` [Bug tree-optimization/109115] [13 Regression] " pinskia at gcc dot gnu.org
2023-03-13 20:33 ` pinskia at gcc dot gnu.org
2023-03-13 21:55 ` jakub at gcc dot gnu.org
2023-03-13 22:00 ` jakub at gcc dot gnu.org
2023-03-13 23:51 ` amacleod at redhat dot com
2023-03-14  8:16 ` cvs-commit at gcc dot gnu.org
2023-03-14  8:17 ` 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).