public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/110600] New: ICE on valid code at -O1 and above on x86_64-linux-gnu: Segmentation fault
@ 2023-07-08 18:55 zhendong.su at inf dot ethz.ch
  2023-07-08 18:58 ` [Bug tree-optimization/110600] [14 Regregression] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2023-07-08 18:55 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110600
           Summary: ICE on valid code at -O1 and above on
                    x86_64-linux-gnu: Segmentation fault
           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: ---

This appears to be a recent regression.

[546] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/home/suz/suz-local/software/local/gcc-trunk/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.0.0/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
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.0 20230708 (experimental) [master r14-924-gd709841ae0f] (GCC) 
[547] % 
[547] % gcctk -O1 small.c
during GIMPLE pass: cunroll
small.c: In function ‘main’:
small.c:2:5: internal compiler error: Segmentation fault
    2 | int main() {
      |     ^~~~
0xfe4473 crash_signal
        ../../gcc-trunk/gcc/toplev.cc:314
0x7fa025ede51f ???
        ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x7fa025f1bfc2 __GI__IO_fwrite
        ./libio/iofwrite.c:37
0xad5839 fprintf
        /usr/include/x86_64-linux-gnu/bits/stdio2.h:105
0xad5839 scale_loop_profile(loop*, profile_probability, long)
        ../../gcc-trunk/gcc/cfgloopmanip.cc:585
0x11469b5 try_unroll_loop_completely
        ../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:911
0x11469b5 canonicalize_loop_induction_variables
        ../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1286
0x1147d82 tree_unroll_loops_completely_1
        ../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1429
0x1147cea tree_unroll_loops_completely_1
        ../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1382
0x1148134 tree_unroll_loops_completely
        ../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1478
0x1148403 execute
        ../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1644
0x1148403 execute
        ../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1634
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.
[548] % 
[548] % cat small.c
int a(int b, int c) { return (b ^ c) < 0 ? b : b - c; }
int main() {
  for (int e = 0; e != -1; e = a(e, 1))
    ;
  return 0;
}

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

* [Bug tree-optimization/110600] [14 Regregression] ICE on valid code at -O1 and above on x86_64-linux-gnu: Segmentation fault
  2023-07-08 18:55 [Bug tree-optimization/110600] New: ICE on valid code at -O1 and above on x86_64-linux-gnu: Segmentation fault zhendong.su at inf dot ethz.ch
@ 2023-07-08 18:58 ` pinskia at gcc dot gnu.org
  2023-07-08 20:28 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-08 18:58 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-07-08
            Summary|ICE on valid code at -O1    |[14 Regregression] ICE on
                   |and above on                |valid code at -O1 and above
                   |x86_64-linux-gnu:           |on x86_64-linux-gnu:
                   |Segmentation fault          |Segmentation fault
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Target Milestone|---                         |14.0
           Keywords|                            |ice-on-valid-code

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
  if (exit_edge && exit_edge->src->loop_father != loop)
    {
      fprintf (dump_file,
               ";; Loop exit is in inner loop;"
               " will leave exit probabilities inconsistent\n");
    }


Confirmed, dump_file is not checked ...

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

* [Bug tree-optimization/110600] [14 Regregression] ICE on valid code at -O1 and above on x86_64-linux-gnu: Segmentation fault
  2023-07-08 18:55 [Bug tree-optimization/110600] New: ICE on valid code at -O1 and above on x86_64-linux-gnu: Segmentation fault zhendong.su at inf dot ethz.ch
  2023-07-08 18:58 ` [Bug tree-optimization/110600] [14 Regregression] " pinskia at gcc dot gnu.org
@ 2023-07-08 20:28 ` pinskia at gcc dot gnu.org
  2023-07-08 21:48 ` cvs-commit at gcc dot gnu.org
  2023-07-09 19:35 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-08 20:28 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |slyfox at gcc dot gnu.org

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 110601 has been marked as a duplicate of this bug. ***

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

* [Bug tree-optimization/110600] [14 Regregression] ICE on valid code at -O1 and above on x86_64-linux-gnu: Segmentation fault
  2023-07-08 18:55 [Bug tree-optimization/110600] New: ICE on valid code at -O1 and above on x86_64-linux-gnu: Segmentation fault zhendong.su at inf dot ethz.ch
  2023-07-08 18:58 ` [Bug tree-optimization/110600] [14 Regregression] " pinskia at gcc dot gnu.org
  2023-07-08 20:28 ` pinskia at gcc dot gnu.org
@ 2023-07-08 21:48 ` cvs-commit at gcc dot gnu.org
  2023-07-09 19:35 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-08 21:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jan Hubicka <hubicka@gcc.gnu.org>:

https://gcc.gnu.org/g:3a42c79c258f54f5837d2fd54874f8b291a518fc

commit r14-2398-g3a42c79c258f54f5837d2fd54874f8b291a518fc
Author: Jan Hubicka <jh@suse.cz>
Date:   Sat Jul 8 23:47:38 2023 +0200

    Add missing profile_dump check

    gcc/ChangeLog:

            PR tree-optimization/110600
            * cfgloopmanip.cc (scale_loop_profile): Add mising profile_dump
check.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/110600
            * gcc.c-torture/compile/pr110600.c: New test.

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

* [Bug tree-optimization/110600] [14 Regregression] ICE on valid code at -O1 and above on x86_64-linux-gnu: Segmentation fault
  2023-07-08 18:55 [Bug tree-optimization/110600] New: ICE on valid code at -O1 and above on x86_64-linux-gnu: Segmentation fault zhendong.su at inf dot ethz.ch
                   ` (2 preceding siblings ...)
  2023-07-08 21:48 ` cvs-commit at gcc dot gnu.org
@ 2023-07-09 19:35 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-09 19:35 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2023-07-09 19:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-08 18:55 [Bug tree-optimization/110600] New: ICE on valid code at -O1 and above on x86_64-linux-gnu: Segmentation fault zhendong.su at inf dot ethz.ch
2023-07-08 18:58 ` [Bug tree-optimization/110600] [14 Regregression] " pinskia at gcc dot gnu.org
2023-07-08 20:28 ` pinskia at gcc dot gnu.org
2023-07-08 21:48 ` cvs-commit at gcc dot gnu.org
2023-07-09 19:35 ` pinskia 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).