public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/102222] New: ICE on s390 (internal compiler error: in extract_insn, at recog.c:2770)
@ 2021-09-06 19:19 sam at gentoo dot org
  2021-09-06 19:21 ` [Bug c/102222] " sam at gentoo dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: sam at gentoo dot org @ 2021-09-06 19:19 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102222
           Summary: ICE on s390 (internal compiler error: in extract_insn,
                    at recog.c:2770)
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sam at gentoo dot org
  Target Milestone: ---

Originally reported downstream at https://bugs.gentoo.org/811867.

This is my first time filing an ICE bug so let me know if I've messed something
up.

The issue was originally observed on a native s390 machine (s390-ibm-linux-gnu)
but I ended up minimising the ICE using cvise via cross. I hit the issue when
building squashfs-tools-4.5. It does not occur with -march=native.

I've managed to minimise the crasher to:
```
$ cat unsquash-1.i
struct squashfs_reg_inode_header_1 read_inode_inode;
read_inode_val;
struct squashfs_reg_inode_header_1 {
  int file_size : 32
} __attribute__((packed)) read_inode() {
  read_inode_inode.file_size = read_inode_val;
}
```

It can be induced via:
```
$ s390-ibm-linux-gnu-gcc -O2 -pipe -march=z10 unsquash-1.i
unsquash-1.i:2:1: warning: data definition has no type or storage class
    2 | read_inode_val;
      | ^~~~~~~~~~~~~~
unsquash-1.i:2:1: warning: type defaults to ‘int’ in declaration of
‘read_inode_val’ [-Wimplicit-int]
unsquash-1.i:5:1: warning: no semicolon at end of struct or union
    5 | } __attribute__((packed)) read_inode() {
      | ^
unsquash-1.i: In function ‘read_inode’:
unsquash-1.i:7:1: error: unrecognizable insn:
    7 | }
      | ^
(insn 9 8 10 2 (set (strict_low_part (reg:SI 66))
        (mem/c:SI (plus:SI (reg/f:SI 64)
                (const_int 4 [0x4])) [1 read_inode_val+0 S4 A32]))
"unsquash-1.i":6:30 -1
     (nil))
during RTL pass: vregs
unsquash-1.i:7:1: internal compiler error: in extract_insn, at recog.c:2770
0x7fa3a9bb680c __libc_start_main
        ../csu/libc-start.c:332
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
```

```
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/s390-ibm-linux-gnu/11.2.0/lto-wrapper
Target: s390-ibm-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-11.2.0/work/gcc-11.2.0/configure
--host=s390-ibm-linux-gnu --build=s390-ibm-linux-gnu --prefix=/usr
--bindir=/usr/s390-ibm-linux-gnu/gcc-bin/11.2.0
--includedir=/usr/lib/gcc/s390-ibm-linux-gnu/11.2.0/include
--datadir=/usr/share/gcc-data/s390-ibm-linux-gnu/11.2.0
--mandir=/usr/share/gcc-data/s390-ibm-linux-gnu/11.2.0/man
--infodir=/usr/share/gcc-data/s390-ibm-linux-gnu/11.2.0/info
--with-gxx-include-dir=/usr/lib/gcc/s390-ibm-linux-gnu/11.2.0/include/g++-v11
--with-python-dir=/share/gcc-data/s390-ibm-linux-gnu/11.2.0/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=release
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 11.2.0 p1'
--disable-esp --enable-libstdcxx-time --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --disable-multilib
--disable-fixed-point --enable-libgomp --disable-libssp --disable-libada
--disable-systemtap --disable-valgrind-annotations --disable-vtable-verify
--disable-libvtv --without-zstd --enable-lto --without-isl
--disable-libsanitizer --disable-default-pie --enable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.2.0 (Gentoo 11.2.0 p1)
```

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

end of thread, other threads:[~2022-12-22 14:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-06 19:19 [Bug c/102222] New: ICE on s390 (internal compiler error: in extract_insn, at recog.c:2770) sam at gentoo dot org
2021-09-06 19:21 ` [Bug c/102222] " sam at gentoo dot org
2021-09-06 19:56 ` sam at gentoo dot org
2021-09-06 21:42 ` [Bug target/102222] " sam at gentoo dot org
2021-09-07  9:24 ` marxin at gcc dot gnu.org
2021-09-14 19:55 ` krebbel at gcc dot gnu.org
2021-09-14 19:57 ` krebbel at gcc dot gnu.org
2021-09-22  7:42 ` cvs-commit at gcc dot gnu.org
2021-09-22 10:21 ` cvs-commit at gcc dot gnu.org
2021-10-15  3:10 ` sam at gentoo dot org
2022-12-22 14:51 ` mpolacek 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).