public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "zhendong.su at inf dot ethz.ch" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/103314] New: ICE on valid code at -O1 and above on x86_64-linux-gnu: Segmentation fault
Date: Thu, 18 Nov 2021 12:39:28 +0000	[thread overview]
Message-ID: <bug-103314-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 103314
           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: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zhendong.su at inf dot ethz.ch
  Target Milestone: ---

It seems to be a recent regression.

[585] % 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/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++
--disable-werror --enable-multilib --with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20211118 (experimental) [master r12-5359-g280d2838c11] (GCC) 
[586] % 
[586] % gcctk -O0 small.c; ./a.out
[587] % 
[587] % gcc110 -O1 small.c; ./a.out
small.c: In function ‘main’:
small.c:3:37: warning: right shift count is negative [-Wshift-count-negative]
    3 |   unsigned c = 0, d = c ? 1 ^ c ^ 1 >> a : 0;
      |                                   ~~^~~~
[588] % 
[588] % gcctk -O1 small.c
small.c: In function ‘main’:
small.c:3:37: warning: right shift count is negative [-Wshift-count-negative]
    3 |   unsigned c = 0, d = c ? 1 ^ c ^ 1 >> a : 0;
      |                                   ~~^~~~
gcctk: internal compiler error: Segmentation fault signal terminated program
cc1
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
[589] % 
[589] % cat small.c
const int a = -1;
int main() {
  unsigned c = 0, d = c ? 1 ^ c ^ 1 >> a : 0;
  return 0;
}

             reply	other threads:[~2021-11-18 12:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-18 12:39 zhendong.su at inf dot ethz.ch [this message]
2021-11-18 12:40 ` [Bug c/103314] " zhendong.su at inf dot ethz.ch
2021-11-18 12:46 ` [Bug middle-end/103314] [12 regression] " pinskia at gcc dot gnu.org
2021-11-18 12:47 ` [Bug middle-end/103314] [12 regression] ICE on valid code at -O1 and above on x86_64-linux-gnu: Segmentation fault since r12-5358 jakub at gcc dot gnu.org
2021-11-18 12:52 ` jakub at gcc dot gnu.org
2021-11-19  1:19 ` pinskia at gcc dot gnu.org
2021-11-19  1:36 ` pinskia at gcc dot gnu.org
2021-11-19  6:33 ` pinskia at gcc dot gnu.org
2021-11-19 12:07 ` cvs-commit at gcc dot gnu.org
2021-11-19 12:08 ` pinskia at gcc dot gnu.org
2021-11-30 11:54 ` 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-103314-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).