public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "slyfox at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/111435] New: [14 Regression] gimple_zero_one_valued_p() infinite recursion
Date: Sat, 16 Sep 2023 19:54:02 +0000	[thread overview]
Message-ID: <bug-111435-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 111435
           Summary: [14 Regression] gimple_zero_one_valued_p() infinite
                    recursion
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: slyfox at gcc dot gnu.org
  Target Milestone: ---

Created attachment 55911
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55911&action=edit
tree-ssa-loop-niter.cc.cc.gz

Noticed on i686-linux gcc bootstrap when building r14-4077-g86451305d8b2a2.

Reproduced on x86_64-linux -m32 as well.

r14-4038-gb975c0dc3be285 looks suspicious. The reduction is a bit slow.
Attaching partially reduced.

How to crash:

$ gcc/xg++ -Bgcc ~/dev/bugs/gcc-14-i686-ICE/tree-ssa-loop-niter.cc.cc -O2 -m32
--verbose

Or:

$ gcc/cc1plus -quiet -imultilib . -iprefix
/tmp/gb/gcc/../lib/gcc/x86_64-pc-linux-gnu/14.0.0/ -isystem gcc/include
-isystem gcc/include-fixed -D_GNU_SOURCE
/home/slyfox/dev/bugs/gcc-14-i686-ICE/tree-ssa-loop-niter.cc.cc -quiet -dumpdir
a- -dumpbase tree-ssa-loop-niter.cc.cc -dumpbase-ext .cc -m32 -mtune=generic
-march=x86-64 -O2 -version -o /run/user/1000/ccgZ63HD.s
GNU C++17 (GCC) version 14.0.0 20230916 (experimental) (x86_64-pc-linux-gnu)
        compiled by GNU C version 14.0.0 20230916 (experimental), GMP version
6.3.0, MPFR version 4.2.1, MPC version 1.3.1, isl version isl-0.20-GMP

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 7c2c55b6bcbe18476b6d2c66d34ac4cc
Segmentation fault (core dumped)

Backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x000000000150a239 in get_nonzero_bits (name=0x7fffe8c02240) at
/home/slyfox/dev/git/gcc/gcc/tree-ssanames.cc:494
494       unsigned int precision = element_precision (TREE_TYPE (name));
(gdb) bt
#0  0x000000000150a239 in get_nonzero_bits (name=0x7fffe8c02240) at
/home/slyfox/dev/git/gcc/gcc/tree-ssanames.cc:494
#1  0x000000000150ad4c in get_nonzero_bits (name=<optimized out>) at
/home/slyfox/dev/git/gcc/gcc/tree-ssanames.cc:489
#2  0x0000000000f04105 in tree_nonzero_bits (t=t@entry=0x7fffe8c02240) at
/home/slyfox/dev/git/gcc/gcc/fold-const.cc:16792
#3  0x00000000021de3ce in gimple_zero_one_valued_p (t=0x7fffe8c02240,
valueize=valueize@entry=0x14a18c0 <rpo_vn_valueize(tree_node*)>) at
gimple-match-3.cc:19
#4  0x00000000021de537 in gimple_zero_one_valued_p (t=0x7fffe8c02090,
valueize=valueize@entry=0x14a18c0 <rpo_vn_valueize(tree_node*)>) at
gimple-match-3.cc:70
#5  0x00000000021de537 in gimple_zero_one_valued_p (t=0x7fffe8c02240,
valueize=valueize@entry=0x14a18c0 <rpo_vn_valueize(tree_node*)>) at
gimple-match-3.cc:70
#6  0x00000000021de537 in gimple_zero_one_valued_p (t=0x7fffe8c02090,
valueize=valueize@entry=0x14a18c0 <rpo_vn_valueize(tree_node*)>) at
gimple-match-3.cc:70
...

             reply	other threads:[~2023-09-16 19:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-16 19:54 slyfox at gcc dot gnu.org [this message]
2023-09-16 19:55 ` [Bug tree-optimization/111435] " pinskia at gcc dot gnu.org
2023-09-16 19:59 ` pinskia at gcc dot gnu.org
2023-09-16 20:08 ` pinskia at gcc dot gnu.org
2023-09-16 21:37 ` slyfox at gcc dot gnu.org
2023-09-16 21:47 ` pinskia at gcc dot gnu.org
2023-09-16 21:54 ` pinskia at gcc dot gnu.org
2023-09-16 22:28 ` pinskia at gcc dot gnu.org
2023-09-17  1:45 ` pinskia at gcc dot gnu.org
2023-09-17  9:02 ` pinskia at gcc dot gnu.org
2023-09-17 10:50 ` slyfox at gcc dot gnu.org
2023-09-17 16:06 ` pinskia at gcc dot gnu.org
2023-09-18  8:33 ` jakub at gcc dot gnu.org
2023-09-18 20:45 ` cvs-commit at gcc dot gnu.org
2023-09-18 20:47 ` pinskia at gcc dot gnu.org
2023-09-19  0:15 ` pinskia at gcc dot gnu.org
2023-09-20  2:12 ` pinskia 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-111435-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).