public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/112430] New: [14 Regression] ICE: verify_ssa failed, missing definition
@ 2023-11-07 23:48 public at timruffing dot de
2023-11-08 0:21 ` [Bug tree-optimization/112430] " sjames at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: public at timruffing dot de @ 2023-11-07 23:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112430
Bug ID: 112430
Summary: [14 Regression] ICE: verify_ssa failed, missing
definition
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: public at timruffing dot de
Target Milestone: ---
Created attachment 56526
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56526&action=edit
output of freport-bug
We see a verify_ssa failed on 14. According to our testing on CI, this is a
regression between snapshots 20231015 and 20231029. I haven't tested any
version in between these. I have attached the source, but sorry, it's a huge
unit build...
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-14-20231105/configure --prefix=/opt/gcc-snapshot
--enable-languages=c --disable-bootstrap --disable-multilib --without-isl
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.0 20231105 (experimental) (GCC)
In file included from src/scalar_impl.h:22,
from src/secp256k1.c:28:
src/scalar_8x32_impl.h: In function 'secp256k1_scalar_reduce_512':
src/scalar_8x32_impl.h:417:13: error: missing definition
417 | static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const
uint32_t *l) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
for SSA_NAME: c2_505 in statement:
# DEBUG c2 => _110 + c2_505
during GIMPLE pass: widening_mul
src/scalar_8x32_impl.h:417:13: internal compiler error: verify_ssa failed
0x1212c19 verify_ssa(bool, bool)
../../gcc-14-20231105/gcc/tree-ssa.cc:1203
0xe8c3c5 execute_function_todo
../../gcc-14-20231105/gcc/passes.cc:2095
0xe8c7ae execute_todo
../../gcc-14-20231105/gcc/passes.cc:2142
/opt/gcc-snapshot/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/cc1 -quiet -I .
-imultiarch x86_64-linux-gnu -MD src/.libs/libsecp256k1_la-secp256k1.d -MF
src/.deps/libsecp256k1_la-secp256k1.Tpo -MP -MT
src/libsecp256k1_la-secp256k1.lo -D PACKAGE_NAME="libsecp256k1" -D
PACKAGE_TARNAME="libsecp256k1" -D PACKAGE_VERSION="0.4.1-dev" -D
PACKAGE_STRING="libsecp256k1 0.4.1-dev" -D
PACKAGE_BUGREPORT="https://github.com/bitcoin-core/secp256k1/issues" -D
PACKAGE_URL="https://github.com/bitcoin-core/secp256k1" -D
PACKAGE="libsecp256k1" -D VERSION="0.4.1-dev" -D HAVE_STDIO_H=1 -D
HAVE_STDLIB_H=1 -D HAVE_STRING_H=1 -D HAVE_INTTYPES_H=1 -D HAVE_STDINT_H=1 -D
HAVE_STRINGS_H=1 -D HAVE_SYS_STAT_H=1 -D HAVE_SYS_TYPES_H=1 -D HAVE_UNISTD_H=1
-D STDC_HEADERS=1 -D HAVE_DLFCN_H=1 -D LT_OBJDIR=".libs/" -D
USE_FORCE_WIDEMUL_INT64=1 -D ECMULT_WINDOW_SIZE=15 -D ECMULT_GEN_PREC_BITS=4 -D
VALGRIND -D PIC src/secp256k1.c -quiet -dumpdir src/.libs/ -dumpbase
libsecp256k1_la-secp256k1.c -dumpbase-ext .c -mtune=generic -march=x86-64 -g
-O2 -O2 -Wpedantic -Wno-long-long -Wnested-externs -Wshadow -Wstrict-prototypes
-Wundef -Wno-overlength-strings -Wall -Wno-unused-function -Wextra -Wcast-align
-Wcast-align=strict -std=c90 -fvisibility=hidden -freport-bug -fPIC -o -
-frandom-seed=0 -fdump-noaddr
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/112430] [14 Regression] ICE: verify_ssa failed, missing definition
2023-11-07 23:48 [Bug tree-optimization/112430] New: [14 Regression] ICE: verify_ssa failed, missing definition public at timruffing dot de
@ 2023-11-08 0:21 ` sjames at gcc dot gnu.org
2023-11-08 0:50 ` sjames at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-11-08 0:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112430
Sam James <sjames at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2023-11-08
CC| |sjames at gcc dot gnu.org
Status|UNCONFIRMED |NEW
--- Comment #1 from Sam James <sjames at gcc dot gnu.org> ---
Reproduced.
```
$ gcc /tmp/foo.i -c -g -O2
In file included from src/scalar_impl.h:22,
from src/secp256k1.c:28:
src/scalar_8x32_impl.h: In function ‘secp256k1_scalar_reduce_512’:
src/scalar_8x32_impl.h:417:13: error: missing definition
for SSA_NAME: c2_505 in statement:
# DEBUG c2 => _110 + c2_505
during GIMPLE pass: widening_mul
src/scalar_8x32_impl.h:417:13: internal compiler error: verify_ssa failed
0x55cf1bcb23c1 verify_ssa(bool, bool) [clone .constprop.0]
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231105/gcc-14-20231105/gcc/tree-ssa.cc:1203
0x55cf1d1affbb execute_function_todo
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231105/gcc-14-20231105/gcc/passes.cc:2095
0x55cf1d1affbb do_per_function
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231105/gcc-14-20231105/gcc/passes.cc:1687
0x55cf1d1affbb execute_todo
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231105/gcc-14-20231105/gcc/passes.cc:2142
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
```
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/112430] [14 Regression] ICE: verify_ssa failed, missing definition
2023-11-07 23:48 [Bug tree-optimization/112430] New: [14 Regression] ICE: verify_ssa failed, missing definition public at timruffing dot de
2023-11-08 0:21 ` [Bug tree-optimization/112430] " sjames at gcc dot gnu.org
@ 2023-11-08 0:50 ` sjames at gcc dot gnu.org
2023-11-08 0:52 ` sjames at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-11-08 0:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112430
--- Comment #2 from Sam James <sjames at gcc dot gnu.org> ---
Reduced:
```
int secp256k1_scalar_reduce_512_r_0_0, secp256k1_scalar_reduce_512_m6,
secp256k1_scalar_reduce_512_m9, secp256k1_scalar_reduce_512_th,
secp256k1_scalar_reduce_512_tl;
unsigned int secp256k1_scalar_reduce_512_c0;
void secp256k1_scalar_reduce_512() {
unsigned int c1, c2 = c1 < secp256k1_scalar_reduce_512_th;
int over = secp256k1_scalar_reduce_512_c0 < secp256k1_scalar_reduce_512_m9;
c1 += over;
c2 += c1 < over;
secp256k1_scalar_reduce_512_c0 = c1;
c1 = c2;
c2 = secp256k1_scalar_reduce_512_c0 += secp256k1_scalar_reduce_512_m6;
over = secp256k1_scalar_reduce_512_c0 < secp256k1_scalar_reduce_512_m6;
c1 += over;
secp256k1_scalar_reduce_512_th +=
secp256k1_scalar_reduce_512_c0 < secp256k1_scalar_reduce_512_tl;
c1 += secp256k1_scalar_reduce_512_th;
c2 += c1 < secp256k1_scalar_reduce_512_th;
secp256k1_scalar_reduce_512_r_0_0 = c2;
}
void secp256k1_ecdsa_sig_sign() { secp256k1_scalar_reduce_512(); }
```
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/112430] [14 Regression] ICE: verify_ssa failed, missing definition
2023-11-07 23:48 [Bug tree-optimization/112430] New: [14 Regression] ICE: verify_ssa failed, missing definition public at timruffing dot de
2023-11-08 0:21 ` [Bug tree-optimization/112430] " sjames at gcc dot gnu.org
2023-11-08 0:50 ` sjames at gcc dot gnu.org
@ 2023-11-08 0:52 ` sjames at gcc dot gnu.org
2023-11-08 2:05 ` sjames at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-11-08 0:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112430
--- Comment #3 from Sam James <sjames at gcc dot gnu.org> ---
Better reduction without uninit:
```
int secp256k1_scalar_reduce_512_r_0_0, secp256k1_scalar_reduce_512_m6,
secp256k1_scalar_reduce_512_m9, secp256k1_scalar_reduce_512_th,
secp256k1_scalar_reduce_512_tl;
unsigned int secp256k1_scalar_reduce_512_c0;
void secp256k1_scalar_reduce_512(unsigned int c1) {
unsigned int c2 = c1 < secp256k1_scalar_reduce_512_th;
int over = secp256k1_scalar_reduce_512_c0 < secp256k1_scalar_reduce_512_m9;
c1 += over;
c2 += c1 < over;
secp256k1_scalar_reduce_512_c0 = c1;
c1 = c2;
c2 = secp256k1_scalar_reduce_512_c0 += secp256k1_scalar_reduce_512_m6;
over = secp256k1_scalar_reduce_512_c0 < secp256k1_scalar_reduce_512_m6;
c1 += over;
secp256k1_scalar_reduce_512_th +=
secp256k1_scalar_reduce_512_c0 < secp256k1_scalar_reduce_512_tl;
c1 += secp256k1_scalar_reduce_512_th;
c2 += c1 < secp256k1_scalar_reduce_512_th;
secp256k1_scalar_reduce_512_r_0_0 = c2;
}
void secp256k1_ecdsa_sig_sign(unsigned int c1) {
secp256k1_scalar_reduce_512(c1); }
```
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/112430] [14 Regression] ICE: verify_ssa failed, missing definition
2023-11-07 23:48 [Bug tree-optimization/112430] New: [14 Regression] ICE: verify_ssa failed, missing definition public at timruffing dot de
` (2 preceding siblings ...)
2023-11-08 0:52 ` sjames at gcc dot gnu.org
@ 2023-11-08 2:05 ` sjames at gcc dot gnu.org
2023-11-08 2:40 ` [Bug middle-end/112430] [14 Regression] ICE: verify_ssa failed, missing definition since r14-1837-g43a3252c42af12 sjames at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-11-08 2:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112430
Sam James <sjames at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=111845
--- Comment #4 from Sam James <sjames at gcc dot gnu.org> ---
I knew this looked familiar... PR111845.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/112430] [14 Regression] ICE: verify_ssa failed, missing definition since r14-1837-g43a3252c42af12
2023-11-07 23:48 [Bug tree-optimization/112430] New: [14 Regression] ICE: verify_ssa failed, missing definition public at timruffing dot de
` (3 preceding siblings ...)
2023-11-08 2:05 ` sjames at gcc dot gnu.org
@ 2023-11-08 2:40 ` sjames at gcc dot gnu.org
2023-11-08 3:16 ` pinskia at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-11-08 2:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112430
Sam James <sjames at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |x86_64-linux-gnu
CC| |jakub at gcc dot gnu.org
Keywords| |ice-on-valid-code
Component|tree-optimization |middle-end
Summary|[14 Regression] ICE: |[14 Regression] ICE:
|verify_ssa failed, missing |verify_ssa failed, missing
|definition |definition since
| |r14-1837-g43a3252c42af12
Target Milestone|--- |14.0
--- Comment #5 from Sam James <sjames at gcc dot gnu.org> ---
Bisected to r14-1837-g43a3252c42af12, same as the other PR.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/112430] [14 Regression] ICE: verify_ssa failed, missing definition since r14-1837-g43a3252c42af12
2023-11-07 23:48 [Bug tree-optimization/112430] New: [14 Regression] ICE: verify_ssa failed, missing definition public at timruffing dot de
` (4 preceding siblings ...)
2023-11-08 2:40 ` [Bug middle-end/112430] [14 Regression] ICE: verify_ssa failed, missing definition since r14-1837-g43a3252c42af12 sjames at gcc dot gnu.org
@ 2023-11-08 3:16 ` pinskia at gcc dot gnu.org
2023-11-08 8:05 ` [Bug tree-optimization/112430] " rguenth at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-08 3:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112430
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 56529
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56529&action=edit
Cleanup testcase
Basically removed the long variable/function names.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/112430] [14 Regression] ICE: verify_ssa failed, missing definition since r14-1837-g43a3252c42af12
2023-11-07 23:48 [Bug tree-optimization/112430] New: [14 Regression] ICE: verify_ssa failed, missing definition public at timruffing dot de
` (5 preceding siblings ...)
2023-11-08 3:16 ` pinskia at gcc dot gnu.org
@ 2023-11-08 8:05 ` rguenth at gcc dot gnu.org
2023-11-10 12:52 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-11-08 8:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112430
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
Component|middle-end |tree-optimization
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/112430] [14 Regression] ICE: verify_ssa failed, missing definition since r14-1837-g43a3252c42af12
2023-11-07 23:48 [Bug tree-optimization/112430] New: [14 Regression] ICE: verify_ssa failed, missing definition public at timruffing dot de
` (6 preceding siblings ...)
2023-11-08 8:05 ` [Bug tree-optimization/112430] " rguenth at gcc dot gnu.org
@ 2023-11-10 12:52 ` jakub at gcc dot gnu.org
2023-11-11 19:16 ` cvs-commit at gcc dot gnu.org
2023-11-11 19:16 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-11-10 12:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112430
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 56552
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56552&action=edit
gcc14-pr112430.patch
Untested fix.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/112430] [14 Regression] ICE: verify_ssa failed, missing definition since r14-1837-g43a3252c42af12
2023-11-07 23:48 [Bug tree-optimization/112430] New: [14 Regression] ICE: verify_ssa failed, missing definition public at timruffing dot de
` (7 preceding siblings ...)
2023-11-10 12:52 ` jakub at gcc dot gnu.org
@ 2023-11-11 19:16 ` cvs-commit at gcc dot gnu.org
2023-11-11 19:16 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-11-11 19:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112430
--- 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:7610e5cc82bd6316cfe0bfee6d9f12d8c2cfa9c3
commit r14-5366-g7610e5cc82bd6316cfe0bfee6d9f12d8c2cfa9c3
Author: Jakub Jelinek <jakub@redhat.com>
Date: Sat Nov 11 20:15:53 2023 +0100
tree-ssa-math-opts: Fix up gsi_remove order in match_uaddc_usubc [PR112430]
The following testcase ICEs, because the temp_stmts were removed in
wrong order, from the ones appearing earlier in the IL to the later ones,
so insert_debug_temps_for_defs can reintroduce dead SSA_NAMEs back into the
IL.
The following patch fixes that by removing them in the order they were
pushed into the vector, which is from later ones to earlier ones.
Additionally, I've noticed I forgot to call release_defs on the removed
stmts.
2023-11-11 Jakub Jelinek <jakub@redhat.com>
PR middle-end/112430
* tree-ssa-math-opts.cc (match_uaddc_usubc): Remove temp_stmts in
the
order they were pushed rather than in reverse order. Call
release_defs after gsi_remove.
* gcc.dg/pr112430.c: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/112430] [14 Regression] ICE: verify_ssa failed, missing definition since r14-1837-g43a3252c42af12
2023-11-07 23:48 [Bug tree-optimization/112430] New: [14 Regression] ICE: verify_ssa failed, missing definition public at timruffing dot de
` (8 preceding siblings ...)
2023-11-11 19:16 ` cvs-commit at gcc dot gnu.org
@ 2023-11-11 19:16 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-11-11 19:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112430
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Should be fixed now.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-11-11 19:16 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-07 23:48 [Bug tree-optimization/112430] New: [14 Regression] ICE: verify_ssa failed, missing definition public at timruffing dot de
2023-11-08 0:21 ` [Bug tree-optimization/112430] " sjames at gcc dot gnu.org
2023-11-08 0:50 ` sjames at gcc dot gnu.org
2023-11-08 0:52 ` sjames at gcc dot gnu.org
2023-11-08 2:05 ` sjames at gcc dot gnu.org
2023-11-08 2:40 ` [Bug middle-end/112430] [14 Regression] ICE: verify_ssa failed, missing definition since r14-1837-g43a3252c42af12 sjames at gcc dot gnu.org
2023-11-08 3:16 ` pinskia at gcc dot gnu.org
2023-11-08 8:05 ` [Bug tree-optimization/112430] " rguenth at gcc dot gnu.org
2023-11-10 12:52 ` jakub at gcc dot gnu.org
2023-11-11 19:16 ` cvs-commit at gcc dot gnu.org
2023-11-11 19:16 ` 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).