public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/94185] New: gcc-10 crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006
@ 2020-03-15 20:57 slyfox at inbox dot ru
2020-03-16 7:56 ` [Bug target/94185] [10 Regression] " rguenth at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: slyfox at inbox dot ru @ 2020-03-15 20:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94185
Bug ID: 94185
Summary: gcc-10 crashes with "error: unable to generate reloads
for {*zero_extendsidi2} internal compiler error: in
curr_insn_transform, at lra-constraints.c:4006
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: slyfox at inbox dot ru
Target Milestone: ---
Created attachment 48037
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48037&action=edit
bug.cc
Originally observed on smartmontools-7.0, reduced with creduce down to:
struct a {
int b;
int c();
a() : b(c()) {}
~a();
char *e();
};
struct f {
void g(int);
};
struct ar {
int au[256];
f h(int);
} bb;
a i();
a j(int);
long k(int, ar);
int d;
void l(char *, ar m, long n) {
switch (m.au[d])
case 0:
n &= 4294967295;
bb.h(0).g(n);
}
void o() {
ar bd;
a bh, bi, attrname = j(0) = i();
int be = k(0, bd);
l(attrname.e(), bd, be);
}
Exact command to crash gcc-master:
$ ./xg++ -B. -O2 -c -o /tmp/bug.o /tmp/bug.cc -fstack-protector-strong -fPIE
/tmp/bug.cc: In function 'void o()':
/tmp/bug.cc:30:1: error: unable to generate reloads for:
30 | }
| ^
(insn 62 61 63 8 (set (mem/c:DI (plus:DI (reg/f:DI 19 frame)
(const_int -2152 [0xfffffffffffff798])) [7 %sfp+-2104 S8 A64])
(zero_extend:DI (mem/c:SI (plus:DI (reg/f:DI 19 frame)
(const_int -2152 [0xfffffffffffff798])) [7 %sfp+-2104 S4
A64]))) "/tmp/bug.cc":22:7 114 {*zero_extendsidi2}
(nil))
during RTL pass: reload
/tmp/bug.cc:30:1: internal compiler error: in curr_insn_transform, at
lra-constraints.c:4006
0x7fc532a94dd9 __libc_start_main
../csu/libc-start.c:308
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler is built as:
$ ./xg++ -B. -v
Reading specs from ./specs
COLLECT_GCC=./xg++
COLLECT_LTO_WRAPPER=./lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --enable-languages=c,c++ --disable-bootstrap
--with-multilib-list=m64
--prefix=/home/slyfox/dev/git/gcc-native-quick/../gcc-native-quick-installed
--disable-nls --without-isl --disable-libsanitizer --disable-libvtv
--disable-libgomp --disable-libstdcxx-pch --disable-libunwind-exceptions
CFLAGS='-O1 ' CXXFLAGS='-O1 ' --with-sysroot=/usr/x86_64-HEAD-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.0.1 20200315 (experimental) (GCC)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/94185] [10 Regression] crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006
2020-03-15 20:57 [Bug c++/94185] New: gcc-10 crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006 slyfox at inbox dot ru
@ 2020-03-16 7:56 ` rguenth at gcc dot gnu.org
2020-03-16 8:51 ` jakub at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-03-16 7:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94185
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2020-03-16
Target Milestone|--- |10.0
Summary|gcc-10 crashes with "error: |[10 Regression] crashes
|unable to generate reloads |with "error: unable to
|for {*zero_extendsidi2} |generate reloads for
|internal compiler error: in |{*zero_extendsidi2}
|curr_insn_transform, at |internal compiler error: in
|lra-constraints.c:4006 |curr_insn_transform, at
| |lra-constraints.c:4006
Priority|P3 |P1
Keywords| |ra
Known to work| |9.3.0
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Must be a recent regression.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/94185] [10 Regression] crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006
2020-03-15 20:57 [Bug c++/94185] New: gcc-10 crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006 slyfox at inbox dot ru
2020-03-16 7:56 ` [Bug target/94185] [10 Regression] " rguenth at gcc dot gnu.org
@ 2020-03-16 8:51 ` jakub at gcc dot gnu.org
2020-03-16 11:52 ` zsojka at seznam dot cz
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-16 8:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94185
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org,
| |vmakarov at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Indeed, started with r10-7165-ga4504f32c056db781a2bdc104dffa1b29684c930
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/94185] [10 Regression] crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006
2020-03-15 20:57 [Bug c++/94185] New: gcc-10 crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006 slyfox at inbox dot ru
2020-03-16 7:56 ` [Bug target/94185] [10 Regression] " rguenth at gcc dot gnu.org
2020-03-16 8:51 ` jakub at gcc dot gnu.org
@ 2020-03-16 11:52 ` zsojka at seznam dot cz
2020-03-16 18:44 ` vmakarov at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: zsojka at seznam dot cz @ 2020-03-16 11:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94185
--- Comment #3 from Zdenek Sojka <zsojka at seznam dot cz> ---
I am hitting probably the same issue:
$ cat testcase.c
int a, b, c;
int
foo (char e, short f, long g)
{
g = __builtin_mul_overflow (a, c, &b) ? g : (unsigned) g;
g &= __builtin_clrsbll (b);
return e + f + g + a + b + c;
}
$ x86_64-pc-linux-gnu-gcc -O -fno-omit-frame-pointer -mbranch-cost=1 testcase.c
testcase.c: In function 'foo':
testcase.c:9:1: error: unable to generate reloads for:
9 | }
| ^
(insn 27 26 28 3 (set (mem/c:DI (plus:DI (reg/f:DI 19 frame)
(const_int -56 [0xffffffffffffffc8])) [2 %sfp+-8 S8 A64])
(zero_extend:DI (mem/c:SI (plus:DI (reg/f:DI 19 frame)
(const_int -56 [0xffffffffffffffc8])) [2 %sfp+-8 S4 A64])))
114 {*zero_extendsidi2}
(nil))
during RTL pass: reload
testcase.c:9:1: internal compiler error: in curr_insn_transform, at
lra-constraints.c:4006
0x6d3384 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/repo/gcc-trunk/gcc/rtl-error.c:108
0x68fcfe curr_insn_transform
/repo/gcc-trunk/gcc/lra-constraints.c:4006
0xe36e76 lra_constraints(bool)
/repo/gcc-trunk/gcc/lra-constraints.c:5025
0xe2199c lra(_IO_FILE*)
/repo/gcc-trunk/gcc/lra.c:2437
0xdd5479 do_reload
/repo/gcc-trunk/gcc/ira.c:5523
0xdd5479 execute
/repo/gcc-trunk/gcc/ira.c:5709
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
and also on another testcase; -fno-omit-frame-pointer seems to be the common
compiler switch
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/94185] [10 Regression] crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006
2020-03-15 20:57 [Bug c++/94185] New: gcc-10 crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006 slyfox at inbox dot ru
` (2 preceding siblings ...)
2020-03-16 11:52 ` zsojka at seznam dot cz
@ 2020-03-16 18:44 ` vmakarov at gcc dot gnu.org
2020-03-16 19:17 ` vmakarov at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2020-03-16 18:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94185
--- Comment #4 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
Thank you the reduced test. I've started to work on this.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/94185] [10 Regression] crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006
2020-03-15 20:57 [Bug c++/94185] New: gcc-10 crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006 slyfox at inbox dot ru
` (3 preceding siblings ...)
2020-03-16 18:44 ` vmakarov at gcc dot gnu.org
@ 2020-03-16 19:17 ` vmakarov at gcc dot gnu.org
2020-03-16 20:44 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2020-03-16 19:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94185
--- Comment #5 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
I found the problem. LRA reused the same insn alternative when mem subreg was
changed.
The patch will be ready today or tomorrow at worst.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/94185] [10 Regression] crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006
2020-03-15 20:57 [Bug c++/94185] New: gcc-10 crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006 slyfox at inbox dot ru
` (4 preceding siblings ...)
2020-03-16 19:17 ` vmakarov at gcc dot gnu.org
@ 2020-03-16 20:44 ` cvs-commit at gcc dot gnu.org
2020-03-17 8:59 ` marxin at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-16 20:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94185
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Vladimir Makarov <vmakarov@gcc.gnu.org>:
https://gcc.gnu.org/g:bae7b38cf8a21e068ad5c0bab089dedb78af3346
commit r10-7197-gbae7b38cf8a21e068ad5c0bab089dedb78af3346
Author: Vladimir N. Makarov <vmakarov@redhat.com>
Date: Mon Mar 16 16:42:19 2020 -0400
Fix PR94185: Do not reuse insn alternative after changing memory subreg.
2020-03-16 Vladimir Makarov <vmakarov@redhat.com>
PR target/94185
* lra-spills.c (remove_pseudos): Do not reuse insn alternative
after changing memory subreg.
2020-03-16 Vladimir Makarov <vmakarov@redhat.com>
PR target/94185
* g++.target/i386/pr94185.C: New test.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/94185] [10 Regression] crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006
2020-03-15 20:57 [Bug c++/94185] New: gcc-10 crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006 slyfox at inbox dot ru
` (5 preceding siblings ...)
2020-03-16 20:44 ` cvs-commit at gcc dot gnu.org
@ 2020-03-17 8:59 ` marxin at gcc dot gnu.org
2020-03-17 10:16 ` cvs-commit at gcc dot gnu.org
2020-03-18 18:28 ` slyfox at inbox dot ru
8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-03-17 8:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94185
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> ---
I hope we can close it.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/94185] [10 Regression] crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006
2020-03-15 20:57 [Bug c++/94185] New: gcc-10 crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006 slyfox at inbox dot ru
` (6 preceding siblings ...)
2020-03-17 8:59 ` marxin at gcc dot gnu.org
@ 2020-03-17 10:16 ` cvs-commit at gcc dot gnu.org
2020-03-18 18:28 ` slyfox at inbox dot ru
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-17 10:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94185
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:994d48620621fa33d32018be5fb70042e38546d5
commit r10-7209-g994d48620621fa33d32018be5fb70042e38546d5
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Mar 17 11:12:59 2020 +0100
testsuite: Fix pr94185.C testcase on i686-linux with C++98 [PR94185]
I'm getting on i686-linux
FAIL: g++.target/i386/pr94185.C -std=gnu++98 (test for excess errors)
This is because of a diagnostic that 4294967295 is unsigned only in ISO
C90.
Adding U suffix fixes it and the testcase still ICEs with unfixed gcc and
passes with current trunk.
2020-03-17 Jakub Jelinek <jakub@redhat.com>
PR target/94185
* g++.target/i386/pr94185.C (l): Use 4294967295U instead of
4294967295
to avoid FAIL with -m32 -std=c++98.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/94185] [10 Regression] crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006
2020-03-15 20:57 [Bug c++/94185] New: gcc-10 crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006 slyfox at inbox dot ru
` (7 preceding siblings ...)
2020-03-17 10:16 ` cvs-commit at gcc dot gnu.org
@ 2020-03-18 18:28 ` slyfox at inbox dot ru
8 siblings, 0 replies; 10+ messages in thread
From: slyfox at inbox dot ru @ 2020-03-18 18:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94185
--- Comment #9 from Sergei Trofimovich <slyfox at inbox dot ru> ---
Now smartmontools-7.0 builds successfully against gcc version 10.0.1 20200317
(experimental), commit 2e30d3e3e88b6a544074ff89de4974bc5e200e89.
Thank you for a superfast fix!
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-03-18 18:28 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-15 20:57 [Bug c++/94185] New: gcc-10 crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006 slyfox at inbox dot ru
2020-03-16 7:56 ` [Bug target/94185] [10 Regression] " rguenth at gcc dot gnu.org
2020-03-16 8:51 ` jakub at gcc dot gnu.org
2020-03-16 11:52 ` zsojka at seznam dot cz
2020-03-16 18:44 ` vmakarov at gcc dot gnu.org
2020-03-16 19:17 ` vmakarov at gcc dot gnu.org
2020-03-16 20:44 ` cvs-commit at gcc dot gnu.org
2020-03-17 8:59 ` marxin at gcc dot gnu.org
2020-03-17 10:16 ` cvs-commit at gcc dot gnu.org
2020-03-18 18:28 ` slyfox at inbox dot ru
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).