public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/98229] New: ICE at -O1 in 32-bit mode on x86_64-pc-linux-gnu in decompose, at rtl.h:2282
@ 2020-12-10 17:36 zhendong.su at inf dot ethz.ch
2020-12-10 18:07 ` [Bug rtl-optimization/98229] [11 Regression] " jakub at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2020-12-10 17:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98229
Bug ID: 98229
Summary: ICE at -O1 in 32-bit mode on x86_64-pc-linux-gnu in
decompose, at rtl.h:2282
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: zhendong.su at inf dot ethz.ch
Target Milestone: ---
[555] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++
--disable-werror --enable-multilib --with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20201210 (experimental) [master revision
b46dd03fe94:30c63a5c82a:afc14c8d0a9e7af13698a7eec84226a3cc4b0e67] (GCC)
[556] %
[556] % gcctk -m32 -O0 -c small.c
[557] %
[557] % gcctk -m32 -O1 -c small.c
during RTL pass: expand
small.c: In function ‘f’:
small.c:2:14: internal compiler error: in decompose, at rtl.h:2282
2 | void f() { a = a % ~0UL; }
| ~~^~~~~~~~~~
0x927acb wi::int_traits<std::pair<rtx_def*, machine_mode> >::decompose(long*,
unsigned int, std::pair<rtx_def*, machine_mode> const&)
../../gcc-trunk/gcc/rtl.h:2280
0x927acb wide_int_ref_storage<false,
false>::wide_int_ref_storage<std::pair<rtx_def*, machine_mode>
>(std::pair<rtx_def*, machine_mode> const&)
../../gcc-trunk/gcc/wide-int.h:1025
0x927acb generic_wide_int<wide_int_ref_storage<false, false>
>::generic_wide_int<std::pair<rtx_def*, machine_mode> >(std::pair<rtx_def*,
machine_mode> const&)
../../gcc-trunk/gcc/wide-int.h:782
0x927acb wide_int_storage::wide_int_storage<std::pair<rtx_def*, machine_mode>
>(std::pair<rtx_def*, machine_mode> const&)
../../gcc-trunk/gcc/wide-int.h:1115
0x927acb
generic_wide_int<wide_int_storage>::generic_wide_int<std::pair<rtx_def*,
machine_mode> >(std::pair<rtx_def*, machine_mode> const&)
../../gcc-trunk/gcc/wide-int.h:782
0x927acb expand_divmod(int, tree_code, machine_mode, rtx_def*, rtx_def*,
rtx_def*, int, optab_methods)
../../gcc-trunk/gcc/expmed.c:4214
0xbec854 expand_doubleword_mod
../../gcc-trunk/gcc/optabs.c:1085
0xbecca1 expand_doubleword_divmod(machine_mode, rtx_def*, rtx_def*, rtx_def**,
bool)
../../gcc-trunk/gcc/optabs.c:1159
0xbea858 expand_binop(machine_mode, optab_tag, rtx_def*, rtx_def*, rtx_def*,
int, optab_methods)
../../gcc-trunk/gcc/optabs.c:2119
0xbedf03 sign_expand_binop(machine_mode, optab_tag, optab_tag, rtx_def*,
rtx_def*, rtx_def*, int, optab_methods)
../../gcc-trunk/gcc/optabs.c:2282
0x928606 expand_divmod(int, tree_code, machine_mode, rtx_def*, rtx_def*,
rtx_def*, int, optab_methods)
../../gcc-trunk/gcc/expmed.c:5216
0x938553 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
../../gcc-trunk/gcc/expr.c:9243
0x93f5e0 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
../../gcc-trunk/gcc/expr.c:10177
0x94b9d1 store_expr(tree_node*, rtx_def*, int, bool, bool)
../../gcc-trunk/gcc/expr.c:5859
0x94d84f expand_assignment(tree_node*, tree_node*, bool)
../../gcc-trunk/gcc/expr.c:5595
0x7f483a expand_gimple_stmt_1
../../gcc-trunk/gcc/cfgexpand.c:3901
0x7f483a expand_gimple_stmt
../../gcc-trunk/gcc/cfgexpand.c:3999
0x7fc087 expand_gimple_basic_block
../../gcc-trunk/gcc/cfgexpand.c:6036
0x7fe9d6 execute
../../gcc-trunk/gcc/cfgexpand.c:6720
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.
[558] %
[558] % cat small.c
unsigned long long a;
void f() { a = a % ~0UL; }
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/98229] [11 Regression] ICE at -O1 in 32-bit mode on x86_64-pc-linux-gnu in decompose, at rtl.h:2282
2020-12-10 17:36 [Bug rtl-optimization/98229] New: ICE at -O1 in 32-bit mode on x86_64-pc-linux-gnu in decompose, at rtl.h:2282 zhendong.su at inf dot ethz.ch
@ 2020-12-10 18:07 ` jakub at gcc dot gnu.org
2020-12-10 18:12 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-12-10 18:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98229
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Ever confirmed|0 |1
Last reconfirmed| |2020-12-10
Summary|ICE at -O1 in 32-bit mode |[11 Regression] ICE at -O1
|on x86_64-pc-linux-gnu in |in 32-bit mode on
|decompose, at rtl.h:2282 |x86_64-pc-linux-gnu in
| |decompose, at rtl.h:2282
Target Milestone|--- |11.0
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Priority|P3 |P1
CC| |jakub at gcc dot gnu.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/98229] [11 Regression] ICE at -O1 in 32-bit mode on x86_64-pc-linux-gnu in decompose, at rtl.h:2282
2020-12-10 17:36 [Bug rtl-optimization/98229] New: ICE at -O1 in 32-bit mode on x86_64-pc-linux-gnu in decompose, at rtl.h:2282 zhendong.su at inf dot ethz.ch
2020-12-10 18:07 ` [Bug rtl-optimization/98229] [11 Regression] " jakub at gcc dot gnu.org
@ 2020-12-10 18:12 ` jakub at gcc dot gnu.org
2020-12-11 11:48 ` cvs-commit at gcc dot gnu.org
2020-12-11 11:50 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-12-10 18:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98229
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 49731
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49731&action=edit
gcc11-pr98229.patch
Untested fix.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/98229] [11 Regression] ICE at -O1 in 32-bit mode on x86_64-pc-linux-gnu in decompose, at rtl.h:2282
2020-12-10 17:36 [Bug rtl-optimization/98229] New: ICE at -O1 in 32-bit mode on x86_64-pc-linux-gnu in decompose, at rtl.h:2282 zhendong.su at inf dot ethz.ch
2020-12-10 18:07 ` [Bug rtl-optimization/98229] [11 Regression] " jakub at gcc dot gnu.org
2020-12-10 18:12 ` jakub at gcc dot gnu.org
@ 2020-12-11 11:48 ` cvs-commit at gcc dot gnu.org
2020-12-11 11:50 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-11 11:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98229
--- Comment #2 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:1423318fa778649365f5a73c2c4657733e191820
commit r11-5929-g1423318fa778649365f5a73c2c4657733e191820
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Dec 11 12:47:52 2020 +0100
expand: Fix up expand_doubleword_mod on 32-bit targets [PR98229]
As the testcase shows, for 32-bit word size we can end up with op1
up to 0xffffffff (0x100000000 % 0xffffffff == 1 and so we use bit == 32
for that), but the CONST_INT we got from caller is for DImode in that case
and not valid for SImode operations.
The following patch canonicalizes the two spots where the constant needs
canonicalization.
2020-12-10 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/98229
* optabs.c (expand_doubleword_mod): Canonicalize op1 and
1 - INTVAL (op1) as word_mode constants when used in
word_mode arithmetics.
* gcc.c-torture/compile/pr98229.c: New test.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/98229] [11 Regression] ICE at -O1 in 32-bit mode on x86_64-pc-linux-gnu in decompose, at rtl.h:2282
2020-12-10 17:36 [Bug rtl-optimization/98229] New: ICE at -O1 in 32-bit mode on x86_64-pc-linux-gnu in decompose, at rtl.h:2282 zhendong.su at inf dot ethz.ch
` (2 preceding siblings ...)
2020-12-11 11:48 ` cvs-commit at gcc dot gnu.org
@ 2020-12-11 11:50 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-12-11 11:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98229
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-12-11 11:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 17:36 [Bug rtl-optimization/98229] New: ICE at -O1 in 32-bit mode on x86_64-pc-linux-gnu in decompose, at rtl.h:2282 zhendong.su at inf dot ethz.ch
2020-12-10 18:07 ` [Bug rtl-optimization/98229] [11 Regression] " jakub at gcc dot gnu.org
2020-12-10 18:12 ` jakub at gcc dot gnu.org
2020-12-11 11:48 ` cvs-commit at gcc dot gnu.org
2020-12-11 11:50 ` 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).