public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101160] New: [12 Regression] ICE in df_word_lr_local_compute, at df-problems.c:2962 since r12-1702-g7232f7c4c2d72743
@ 2021-06-22 6:23 marxin at gcc dot gnu.org
2021-06-22 6:23 ` [Bug c++/101160] " marxin at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-06-22 6:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101160
Bug ID: 101160
Summary: [12 Regression] ICE in df_word_lr_local_compute, at
df-problems.c:2962 since r12-1702-g7232f7c4c2d72743
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
CC: jason at gcc dot gnu.org
Target Milestone: ---
The following fails:
$ g++ /home/marxin/Programming/gcc/gcc/testsuite/g++.dg/abi/param2.C -O2
during RTL pass: subreg3
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/abi/param2.C: In function ‘S
foo(S)’:
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/abi/param2.C:12:1: internal
compiler error: in df_word_lr_local_compute, at df-problems.c:2962
12 | }
| ^
0x77484b df_word_lr_local_compute
/home/marxin/Programming/gcc/gcc/df-problems.c:2962
0xd3c042 df_analyze_problem(dataflow*, bitmap_head*, int*, int)
/home/marxin/Programming/gcc/gcc/df-core.c:1171
0xd3cf41 df_analyze_1
/home/marxin/Programming/gcc/gcc/df-core.c:1228
0x1bc3045 init_dce
/home/marxin/Programming/gcc/gcc/dce.c:763
0x1bc57e1 run_word_dce()
/home/marxin/Programming/gcc/gcc/dce.c:1213
0x1cb93d2 decompose_multiword_subregs
/home/marxin/Programming/gcc/gcc/lower-subreg.c:1516
0x1cba94d execute
/home/marxin/Programming/gcc/gcc/lower-subreg.c:1816
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/101160] [12 Regression] ICE in df_word_lr_local_compute, at df-problems.c:2962 since r12-1702-g7232f7c4c2d72743
2021-06-22 6:23 [Bug c++/101160] New: [12 Regression] ICE in df_word_lr_local_compute, at df-problems.c:2962 since r12-1702-g7232f7c4c2d72743 marxin at gcc dot gnu.org
@ 2021-06-22 6:23 ` marxin at gcc dot gnu.org
2021-06-22 6:28 ` [Bug middle-end/101160] " pinskia at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-06-22 6:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101160
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |12.0
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Target Milestone|--- |12.0
Last reconfirmed| |2021-06-22
Known to work| |11.1.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/101160] [12 Regression] ICE in df_word_lr_local_compute, at df-problems.c:2962 since r12-1702-g7232f7c4c2d72743
2021-06-22 6:23 [Bug c++/101160] New: [12 Regression] ICE in df_word_lr_local_compute, at df-problems.c:2962 since r12-1702-g7232f7c4c2d72743 marxin at gcc dot gnu.org
2021-06-22 6:23 ` [Bug c++/101160] " marxin at gcc dot gnu.org
@ 2021-06-22 6:28 ` pinskia at gcc dot gnu.org
2021-06-22 9:26 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-06-22 6:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101160
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
What target?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/101160] [12 Regression] ICE in df_word_lr_local_compute, at df-problems.c:2962 since r12-1702-g7232f7c4c2d72743
2021-06-22 6:23 [Bug c++/101160] New: [12 Regression] ICE in df_word_lr_local_compute, at df-problems.c:2962 since r12-1702-g7232f7c4c2d72743 marxin at gcc dot gnu.org
2021-06-22 6:23 ` [Bug c++/101160] " marxin at gcc dot gnu.org
2021-06-22 6:28 ` [Bug middle-end/101160] " pinskia at gcc dot gnu.org
@ 2021-06-22 9:26 ` jakub at gcc dot gnu.org
2021-06-22 9:40 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-06-22 9:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101160
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
x86_64 at least.
Before the change, the first function contained
(insn 12 3 13 2 (clobber (reg:TI 82 [ <retval> ])) "param3.C":12:1 -1
(expr_list:REG_UNUSED (reg:TI 82 [ <retval> ])
(nil)))
(insn 13 12 9 2 (set (reg:TI 82 [ <retval> ])
(const_int 0 [0])) "param3.C":12:1 -1
(nil))
(insn 9 13 10 2 (set (reg/i:TI 0 ax)
(reg:TI 82 [ <retval> ])) "param3.C":12:1 73 {*movti_internal}
(expr_list:REG_DEAD (reg:TI 82 [ <retval> ])
(nil)))
(insn 10 9 0 2 (use (reg/i:TI 0 ax)) "param3.C":12:1 -1
(nil))
in split1, now it has:
(insn 11 3 12 2 (clobber (reg:TI 82 [ <retval> ])) "param2.C":12:1 -1
(expr_list:REG_UNUSED (reg:TI 82 [ <retval> ])
(nil)))
(insn 12 11 9 2 (set (reg:TI 82 [ <retval> ])
(const_int 0 [0])) "param2.C":12:1 -1
(nil))
(insn 9 12 0 2 (use (reg:TI 82 [ <retval> ])) "param2.C":12:1 -1
(nil))
instead and triggers the
2956 if (bb_index == EXIT_BLOCK)
2957 {
2958 unsigned regno;
2959 bitmap_iterator bi;
2960 EXECUTE_IF_SET_IN_BITMAP (df->exit_block_uses,
FIRST_PSEUDO_REGISTER,
2961 regno, bi)
2962 gcc_unreachable ();
2963 }
assertion because pseudo 82 is in df->exit_block_uses.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/101160] [12 Regression] ICE in df_word_lr_local_compute, at df-problems.c:2962 since r12-1702-g7232f7c4c2d72743
2021-06-22 6:23 [Bug c++/101160] New: [12 Regression] ICE in df_word_lr_local_compute, at df-problems.c:2962 since r12-1702-g7232f7c4c2d72743 marxin at gcc dot gnu.org
` (2 preceding siblings ...)
2021-06-22 9:26 ` jakub at gcc dot gnu.org
@ 2021-06-22 9:40 ` jakub at gcc dot gnu.org
2021-06-22 13:24 ` cvs-commit at gcc dot gnu.org
2021-07-18 10:42 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-06-22 9:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101160
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 51048
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51048&action=edit
gcc12-pr101160.patch
Untested fix.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/101160] [12 Regression] ICE in df_word_lr_local_compute, at df-problems.c:2962 since r12-1702-g7232f7c4c2d72743
2021-06-22 6:23 [Bug c++/101160] New: [12 Regression] ICE in df_word_lr_local_compute, at df-problems.c:2962 since r12-1702-g7232f7c4c2d72743 marxin at gcc dot gnu.org
` (3 preceding siblings ...)
2021-06-22 9:40 ` jakub at gcc dot gnu.org
@ 2021-06-22 13:24 ` cvs-commit at gcc dot gnu.org
2021-07-18 10:42 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-22 13:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101160
--- Comment #4 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:9b613e825d706b18f69e40edaee3eaf27d28f5cb
commit r12-1727-g9b613e825d706b18f69e40edaee3eaf27d28f5cb
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Jun 22 15:21:35 2021 +0200
expand: Fix up empty class return optimization [PR101160]
On Mon, Jun 14, 2021 at 11:24:22PM -0400, Jason Merrill via Gcc-patches
wrote:
> The x86_64 psABI says that an empty class isn't passed or returned in
memory or
> registers, so we shouldn't set %eax in this function. Is this a
reasonable
> place to implement that? Another possibility would be to remove the hack
to
> prevent i386.c:function_value_64 from returning NULL in this case and fix
the
> callers to deal, but that seems like more work.
>
> The df-scan hunk catches the case where we look at a 0-length reg and
build
> a range the length of unsigned int, which happened before I changed
> assign_parms to match expand_function_end.
The assign_params change unfortunately breaks e.g. the following testcase.
The problem is that some passes (e.g. subreg lowering but assign_parms
comments also talk about delayed slot scheduling) rely on crtl->return_rtx
not to contain pseudo registers, and the assign_parms change results
in the pseudo in there not being replaced with a hard register.
The following patch instead clears the crtl->return_rtx if a function
returns TYPE_EMPTY_P structure, that way (use (pseudo)) is not emitted
into the IL and it is treated like more like functions returning void.
I've also changed the effective target on the empty-class1.C testcase, so
that it doesn't fail on x86_64-linux with -m32 testing.
2021-06-22 Jakub Jelinek <jakub@redhat.com>
PR middle-end/101160
* function.c (assign_parms): For decl_result with TYPE_EMPTY_P type
clear crtl->return_rtx instead of keeping it referencing a pseudo.
* g++.target/i386/empty-class1.C: Require lp64 effective target
instead of x86_64-*-*.
* g++.target/i386/empty-class2.C: New test.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/101160] [12 Regression] ICE in df_word_lr_local_compute, at df-problems.c:2962 since r12-1702-g7232f7c4c2d72743
2021-06-22 6:23 [Bug c++/101160] New: [12 Regression] ICE in df_word_lr_local_compute, at df-problems.c:2962 since r12-1702-g7232f7c4c2d72743 marxin at gcc dot gnu.org
` (4 preceding siblings ...)
2021-06-22 13:24 ` cvs-commit at gcc dot gnu.org
@ 2021-07-18 10:42 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-07-18 10:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101160
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-07-18 10:42 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-22 6:23 [Bug c++/101160] New: [12 Regression] ICE in df_word_lr_local_compute, at df-problems.c:2962 since r12-1702-g7232f7c4c2d72743 marxin at gcc dot gnu.org
2021-06-22 6:23 ` [Bug c++/101160] " marxin at gcc dot gnu.org
2021-06-22 6:28 ` [Bug middle-end/101160] " pinskia at gcc dot gnu.org
2021-06-22 9:26 ` jakub at gcc dot gnu.org
2021-06-22 9:40 ` jakub at gcc dot gnu.org
2021-06-22 13:24 ` cvs-commit at gcc dot gnu.org
2021-07-18 10:42 ` 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).