public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/103314] New: ICE on valid code at -O1 and above on x86_64-linux-gnu: Segmentation fault
@ 2021-11-18 12:39 zhendong.su at inf dot ethz.ch
  2021-11-18 12:40 ` [Bug c/103314] " zhendong.su at inf dot ethz.ch
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2021-11-18 12:39 UTC (permalink / raw)
  To: gcc-bugs

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;
}

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

end of thread, other threads:[~2021-11-30 11:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18 12:39 [Bug c/103314] New: ICE on valid code at -O1 and above on x86_64-linux-gnu: Segmentation fault zhendong.su at inf dot ethz.ch
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

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