public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/112875] New: ICE: in lra_eliminate_regs_1, at lra-eliminations.cc:670 with -Oz -frounding-math -fno-dce -fno-trapping-math -fno-tree-dce -fno-tree-dse -g
@ 2023-12-06 6:46 iamanonymous.cs at gmail dot com
2023-12-06 8:02 ` [Bug rtl-optimization/112875] [14 Regression] " rguenth at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: iamanonymous.cs at gmail dot com @ 2023-12-06 6:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112875
Bug ID: 112875
Summary: ICE: in lra_eliminate_regs_1, at
lra-eliminations.cc:670 with -Oz -frounding-math
-fno-dce -fno-trapping-math -fno-tree-dce
-fno-tree-dse -g
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
Assignee: unassigned at gcc dot gnu.org
Reporter: iamanonymous.cs at gmail dot com
Target Milestone: ---
*******************************************************************************
OS and Platform:
$ uname -a:
Linux ubuntu 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023
x86_64 x86_64 x86_64 GNU/Linux
*******************************************************************************
gcc version:
$ gcc -v
Using built-in specs.
COLLECT_GCC=/root/gcc_set/202311291030/bin/gcc
COLLECT_LTO_WRAPPER=/root/gcc_set/202311291030/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/root/gcc_set/202311291030
--with-gmp=/root/build_essential --with-mpfr=/root/build_essential
--with-mpc=/root/build_essential --enable-languages=c,c++ --disable-multilib
--with-sanitizer=address,undefined,thread,leak
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.0 20231129 (experimental) (GCC)
git version: 99fa0bfd63d97825c4221dcd3123940f1d0e6291
*******************************************************************************
Program:
$ cat mutant.c
long a, f;
int b, c, d, g, h, i, j;
char e;
void k(long, int l, char t) {
char m = b, n = g, o = 0;
int p, q, r = h;
long s = g;
if (f) {
q = t + (float)16777217;
o = ~0;
}
if (e) {
d = g + a;
if (d % (a % l)) {
p = d;
n = b;
}
if (l) {
i = b;
r = a;
p = h;
}
if (s)
s = q;
c = f;
e += t;
a = p;
}
j = r % n;
s += g / 0xc000000000000000 + !o;
}
*******************************************************************************
Compiler explorer:
Command Lines:
$ gcc -Oz -frounding-math -fno-dce -fno-trapping-math -fno-tree-dce
-fno-tree-dse -g mutant.c
during RTL pass: reload
mutant.c: In function ‘k’:
mutant.c:31:1: internal compiler error: in lra_eliminate_regs_1, at
lra-eliminations.cc:670
31 | }
| ^
0x7bbb24 lra_eliminate_regs_1(rtx_insn*, rtx_def*, machine_mode, bool, bool,
poly_int<1u, long>, bool)
../../gcc/gcc/lra-eliminations.cc:670
0xe38f0e lra_eliminate_regs_1(rtx_insn*, rtx_def*, machine_mode, bool, bool,
poly_int<1u, long>, bool)
../../gcc/gcc/lra-eliminations.cc:446
0xe38c08 lra_eliminate_regs_1(rtx_insn*, rtx_def*, machine_mode, bool, bool,
poly_int<1u, long>, bool)
../../gcc/gcc/lra-eliminations.cc:613
0xe396c4 eliminate_regs_in_insn(rtx_insn*, bool, bool, poly_int<1u, long>)
../../gcc/gcc/lra-eliminations.cc:1046
0xe3a029 process_insn_for_elimination
../../gcc/gcc/lra-eliminations.cc:1375
0xe3a029 lra_eliminate(bool, bool)
../../gcc/gcc/lra-eliminations.cc:1473
0xe1d759 lra(_IO_FILE*)
../../gcc/gcc/lra.cc:2553
0xdd3241 do_reload
../../gcc/gcc/ira.cc:5973
0xdd3241 execute
../../gcc/gcc/ira.cc:6161
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Also ICE on trunk, compiler explorer: https://godbolt.org/z/39PEKqEzc
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/112875] [14 Regression] ICE: in lra_eliminate_regs_1, at lra-eliminations.cc:670 with -Oz -frounding-math -fno-dce -fno-trapping-math -fno-tree-dce -fno-tree-dse -g
2023-12-06 6:46 [Bug debug/112875] New: ICE: in lra_eliminate_regs_1, at lra-eliminations.cc:670 with -Oz -frounding-math -fno-dce -fno-trapping-math -fno-tree-dce -fno-tree-dse -g iamanonymous.cs at gmail dot com
@ 2023-12-06 8:02 ` rguenth at gcc dot gnu.org
2023-12-08 16:14 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-12-06 8:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112875
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vmakarov at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Summary|ICE: in |[14 Regression] ICE: in
|lra_eliminate_regs_1, at |lra_eliminate_regs_1, at
|lra-eliminations.cc:670 |lra-eliminations.cc:670
|with -Oz -frounding-math |with -Oz -frounding-math
|-fno-dce -fno-trapping-math |-fno-dce -fno-trapping-math
|-fno-tree-dce -fno-tree-dse |-fno-tree-dce -fno-tree-dse
|-g |-g
Last reconfirmed| |2023-12-06
Known to work| |13.2.1
Keywords| |ice-on-valid-code,
| |needs-bisection, ra
Target| |x86_64-*-*
Ever confirmed|0 |1
Target Milestone|--- |14.0
Component|debug |rtl-optimization
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.
#1 0x000000000147b8fc in lra_eliminate_regs_1 (insn=0x7ffff7201180,
x=0x7ffff7203df0, mem_mode=E_VOIDmode, subst_p=true, update_p=false,
update_sp_offset=..., full_p=false)
at /space/rguenther/src/gcc/gcc/lra-eliminations.cc:670
670 gcc_unreachable ();
(gdb) l
665 return gen_rtx_USE (GET_MODE (x), new_rtx);
666 return x;
667
668 case CLOBBER:
669 case SET:
670 gcc_unreachable ();
671
672 default:
673 break;
674 }
(gdb) p debug_rtx (insn)
(debug_insn 41 40 42 3 (var_location:SI q (fix:SI (plus:SF (float:SF
(sign_extend:SI (mem/c:QI (plus:DI (reg/f:DI 19 frame)
(const_int -12 [0xfffffffffffffff4])) [3 %sfp+-12
S1 A32])))
(clobber:SF (const_int 0 [0]))))) "t.c":9:7 -1
(nil))
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/112875] [14 Regression] ICE: in lra_eliminate_regs_1, at lra-eliminations.cc:670 with -Oz -frounding-math -fno-dce -fno-trapping-math -fno-tree-dce -fno-tree-dse -g
2023-12-06 6:46 [Bug debug/112875] New: ICE: in lra_eliminate_regs_1, at lra-eliminations.cc:670 with -Oz -frounding-math -fno-dce -fno-trapping-math -fno-tree-dce -fno-tree-dse -g iamanonymous.cs at gmail dot com
2023-12-06 8:02 ` [Bug rtl-optimization/112875] [14 Regression] " rguenth at gcc dot gnu.org
@ 2023-12-08 16:14 ` jakub at gcc dot gnu.org
2023-12-08 19:32 ` vmakarov at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-12-08 16:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112875
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|needs-bisection |
CC| |jakub at gcc dot gnu.org
Priority|P3 |P1
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r14-53-g675b1a7f113adb1d737adaf78b4fd90be7a0ed1a
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/112875] [14 Regression] ICE: in lra_eliminate_regs_1, at lra-eliminations.cc:670 with -Oz -frounding-math -fno-dce -fno-trapping-math -fno-tree-dce -fno-tree-dse -g
2023-12-06 6:46 [Bug debug/112875] New: ICE: in lra_eliminate_regs_1, at lra-eliminations.cc:670 with -Oz -frounding-math -fno-dce -fno-trapping-math -fno-tree-dce -fno-tree-dse -g iamanonymous.cs at gmail dot com
2023-12-06 8:02 ` [Bug rtl-optimization/112875] [14 Regression] " rguenth at gcc dot gnu.org
2023-12-08 16:14 ` jakub at gcc dot gnu.org
@ 2023-12-08 19:32 ` vmakarov at gcc dot gnu.org
2023-12-08 20:52 ` cvs-commit at gcc dot gnu.org
2024-02-06 15:30 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2023-12-08 19:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112875
--- Comment #3 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2)
> Started with r14-53-g675b1a7f113adb1d737adaf78b4fd90be7a0ed1a
I reproduced it and hope to fix it today.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/112875] [14 Regression] ICE: in lra_eliminate_regs_1, at lra-eliminations.cc:670 with -Oz -frounding-math -fno-dce -fno-trapping-math -fno-tree-dce -fno-tree-dse -g
2023-12-06 6:46 [Bug debug/112875] New: ICE: in lra_eliminate_regs_1, at lra-eliminations.cc:670 with -Oz -frounding-math -fno-dce -fno-trapping-math -fno-tree-dce -fno-tree-dse -g iamanonymous.cs at gmail dot com
` (2 preceding siblings ...)
2023-12-08 19:32 ` vmakarov at gcc dot gnu.org
@ 2023-12-08 20:52 ` cvs-commit at gcc dot gnu.org
2024-02-06 15:30 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-08 20:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112875
--- Comment #4 from GCC 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:48cb51827c9eb991b92014a3f59d31eb237ce03f
commit r14-6347-g48cb51827c9eb991b92014a3f59d31eb237ce03f
Author: Vladimir N. Makarov <vmakarov@redhat.com>
Date: Fri Dec 8 15:37:42 2023 -0500
[PR112875][LRA]: Fix an assert in lra elimination code
PR112875 test ran into a wrong assert (gcc_unreachable) in elimination
in a debug insn. The insn seems ok. So I change the assertion.
To be more accurate I made it the same as analogous reload pass code.
gcc/ChangeLog:
PR rtl-optimization/112875
* lra-eliminations.cc (lra_eliminate_regs_1): Change an assert.
Add ASM_OPERANDS case.
gcc/testsuite/ChangeLog:
PR rtl-optimization/112875
* gcc.target/i386/pr112875.c: New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/112875] [14 Regression] ICE: in lra_eliminate_regs_1, at lra-eliminations.cc:670 with -Oz -frounding-math -fno-dce -fno-trapping-math -fno-tree-dce -fno-tree-dse -g
2023-12-06 6:46 [Bug debug/112875] New: ICE: in lra_eliminate_regs_1, at lra-eliminations.cc:670 with -Oz -frounding-math -fno-dce -fno-trapping-math -fno-tree-dce -fno-tree-dse -g iamanonymous.cs at gmail dot com
` (3 preceding siblings ...)
2023-12-08 20:52 ` cvs-commit at gcc dot gnu.org
@ 2024-02-06 15:30 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-02-06 15:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112875
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-02-06 15:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-06 6:46 [Bug debug/112875] New: ICE: in lra_eliminate_regs_1, at lra-eliminations.cc:670 with -Oz -frounding-math -fno-dce -fno-trapping-math -fno-tree-dce -fno-tree-dse -g iamanonymous.cs at gmail dot com
2023-12-06 8:02 ` [Bug rtl-optimization/112875] [14 Regression] " rguenth at gcc dot gnu.org
2023-12-08 16:14 ` jakub at gcc dot gnu.org
2023-12-08 19:32 ` vmakarov at gcc dot gnu.org
2023-12-08 20:52 ` cvs-commit at gcc dot gnu.org
2024-02-06 15:30 ` jakub 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).