[Bug target/102222] ICE on s390 (internal compiler error: in extract_insn, at recog.c:2770)

2022-12-22 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
 CC||mpolacek at gcc dot gnu.org

--- Comment #10 from Marek Polacek  ---
Looks fixed.

[Bug target/102222] ICE on s390 (internal compiler error: in extract_insn, at recog.c:2770)

2021-10-14 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10

--- Comment #9 from Sam James  ---
Confirmed that the GCC 11 branch backport works here. Thanks all!

[Bug target/102222] ICE on s390 (internal compiler error: in extract_insn, at recog.c:2770)

2021-09-22 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10

--- Comment #8 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Andreas Krebbel
:

https://gcc.gnu.org/g:22b25535b8b2f9961e4772b1cc7cce5dc2f60719

commit r11-9025-g22b25535b8b2f9961e4772b1cc7cce5dc2f60719
Author: Andreas Krebbel 
Date:   Wed Sep 22 09:32:21 2021 +0200

IBM Z: Fix PR10

Avoid emitting a strict low part move if the insv target actually
affects the whole target reg.

gcc/ChangeLog:

PR target/10
* config/s390/s390.c (s390_expand_insv): Emit a normal move if it
is actually a full copy of the source operand into the target.
Don't emit a strict low part move if source and target mode match.

gcc/testsuite/ChangeLog:

* gcc.target/s390/pr10.c: New test.

(cherry picked from commit a9b3c451be58f0fe660154323ace7ba72a4211ec)

[Bug target/102222] ICE on s390 (internal compiler error: in extract_insn, at recog.c:2770)

2021-09-22 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10

--- Comment #7 from CVS Commits  ---
The master branch has been updated by Andreas Krebbel :

https://gcc.gnu.org/g:a9b3c451be58f0fe660154323ace7ba72a4211ec

commit r12-3780-ga9b3c451be58f0fe660154323ace7ba72a4211ec
Author: Andreas Krebbel 
Date:   Wed Sep 22 09:32:21 2021 +0200

IBM Z: Fix PR10

Avoid emitting a strict low part move if the insv target actually
affects the whole target reg.

gcc/ChangeLog:

PR target/10
* config/s390/s390.c (s390_expand_insv): Emit a normal move if it
is actually a full copy of the source operand into the target.
Don't emit a strict low part move if source and target mode match.

gcc/testsuite/ChangeLog:

* gcc.target/s390/pr10.c: New test.

[Bug target/102222] ICE on s390 (internal compiler error: in extract_insn, at recog.c:2770)

2021-09-14 Thread krebbel at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10

--- Comment #6 from Andreas Krebbel  ---
(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]))

With -mesa this should be a simple move. However, in that case it apparently is
emitted via insv.

[Bug target/102222] ICE on s390 (internal compiler error: in extract_insn, at recog.c:2770)

2021-09-14 Thread krebbel at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10

Andreas Krebbel  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |krebbel at gcc dot 
gnu.org

--- Comment #5 from Andreas Krebbel  ---
Created attachment 51461
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51461=edit
Experimental patch

[Bug target/102222] ICE on s390 (internal compiler error: in extract_insn, at recog.c:2770)

2021-09-07 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2021-09-07
 CC||krebbel at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #4 from Martin Liška  ---
Thank you for the report.
I can confirm it happens for the current master:

$ ./xgcc -B. ~/Programming/testcases/pr10.c -O2 -pipe -march=z10 -c
./as: line 114: exec: -m: invalid option
exec: usage: exec [-cl] [-a name] [command [argument ...]] [redirection ...]
/home/marxin/Programming/testcases/pr10.c:2:1: warning: data definition has
no type or storage class
2 | read_inode_val;
  | ^~
/home/marxin/Programming/testcases/pr10.c:2:1: warning: type defaults to
‘int’ in declaration of ‘read_inode_val’ [-Wimplicit-int]
/home/marxin/Programming/testcases/pr10.c:5:1: warning: no semicolon at end
of struct or union
5 | } __attribute__((packed)) read_inode() {
  | ^
/home/marxin/Programming/testcases/pr10.c: In function ‘read_inode’:
/home/marxin/Programming/testcases/pr10.c: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]))
"/home/marxin/Programming/testcases/pr10.c":6:30 -1
 (nil))
during RTL pass: vregs
/home/marxin/Programming/testcases/pr10.c:7:1: internal compiler error: in
extract_insn, at recog.c:2769
0x6998f5 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/home/marxin/Programming/gcc2/gcc/rtl-error.c:108
0x699911 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
/home/marxin/Programming/gcc2/gcc/rtl-error.c:116
0x698327 extract_insn(rtx_insn*)
/home/marxin/Programming/gcc2/gcc/recog.c:2769
0xaa8bb5 instantiate_virtual_regs_in_insn
/home/marxin/Programming/gcc2/gcc/function.c:1611
0xaa8bb5 instantiate_virtual_regs
/home/marxin/Programming/gcc2/gcc/function.c:1985
0xaa8bb5 execute
/home/marxin/Programming/gcc2/gcc/function.c:2034
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

$ ./xgcc -v
Using built-in specs.
COLLECT_GCC=./xgcc
Target: s390-linux-gnu
Configured with: /home/marxin/Programming/gcc2/configure
--enable-languages=c,c++,fortran,lto --prefix=/home/marxin/bin/gcc2
--disable-bootstrap --disable-multilib --disable-libsanitizer
--target=s390-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20210907 (experimental) (GCC)

[Bug target/102222] ICE on s390 (internal compiler error: in extract_insn, at recog.c:2770)

2021-09-06 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10

--- Comment #3 from Sam James  ---
This appears to work fine (cannot reproduce the ICE) with GCC 12 at
1bc66017c118229a101f0a2c097a9c209f777883:

```
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/s390-ibm-linux-gnu/12.0.0/lto-wrapper
Target: s390-ibm-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-12.0.0_pre/work/gcc-12.0.0_pre/configure
--host=s390-ibm-linux-gnu --build=s390-ibm-linux-gnu --prefix=/usr
--bindir=/usr/s390-ibm-linux-gnu/gcc-bin/12.0.0
--includedir=/usr/lib/gcc/s390-ibm-linux-gnu/12.0.0/include
--datadir=/usr/share/gcc-data/s390-ibm-linux-gnu/12.0.0
--mandir=/usr/share/gcc-data/s390-ibm-linux-gnu/12.0.0/man
--infodir=/usr/share/gcc-data/s390-ibm-linux-gnu/12.0.0/info
--with-gxx-include-dir=/usr/lib/gcc/s390-ibm-linux-gnu/12.0.0/include/g++-v12
--with-python-dir=/share/gcc-data/s390-ibm-linux-gnu/12.0.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 12.0.0_pre
p2, commit 1bc66017c118229a101f0a2c097a9c209f777883' --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 12.0.0 20210906 (experimental) (Gentoo 12.0.0_pre p2, commit
1bc66017c118229a101f0a2c097a9c209f777883)
```