public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/107679] New: [13 Regression] ICE in maybe_register_def, at tree-into-ssa.cc:1914
@ 2022-11-14 17:25 gscfq@t-online.de
2022-11-14 18:07 ` [Bug fortran/107679] " anlauf at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: gscfq@t-online.de @ 2022-11-14 17:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107679
Bug ID: 107679
Summary: [13 Regression] ICE in maybe_register_def, at
tree-into-ssa.cc:1914
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Started between 20220918 and 20220925, at -O1+ :
(gcc configured with --enable-checking=yes)
$ cat z1.f90
subroutine s1(x)
integer, intent(out) :: x
end
subroutine s2(z)
integer, value :: z
call s1(z)
end
$ cat z2.f90
subroutine s1(x)
integer, intent(out) :: x
x = 3
end
subroutine s2(z)
integer, value :: z
call s1(z)
end
$ gfortran-13-20221106 -c z1.f90 -O2
during GIMPLE pass: ccp
z1.f90:7:3:
7 | end
| ^
internal compiler error: in maybe_register_def, at tree-into-ssa.cc:1914
0xffb188 maybe_register_def
../../gcc/tree-into-ssa.cc:1914
0xffb188 rewrite_update_stmt
../../gcc/tree-into-ssa.cc:2063
0xffb188 rewrite_update_dom_walker::before_dom_children(basic_block_def*)
../../gcc/tree-into-ssa.cc:2236
0x1cce2a7 dom_walker::walk(basic_block_def*)
../../gcc/domwalk.cc:311
0xff80e9 rewrite_blocks
../../gcc/tree-into-ssa.cc:2296
0xfff24e update_ssa(unsigned int)
../../gcc/tree-into-ssa.cc:3581
0x11f022e execute_update_addresses_taken()
../../gcc/tree-ssa.cc:2177
0xe47700 execute_function_todo
../../gcc/passes.cc:2066
0xe480b2 execute_todo
../../gcc/passes.cc:2145
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/107679] [13 Regression] ICE in maybe_register_def, at tree-into-ssa.cc:1914
2022-11-14 17:25 [Bug fortran/107679] New: [13 Regression] ICE in maybe_register_def, at tree-into-ssa.cc:1914 gscfq@t-online.de
@ 2022-11-14 18:07 ` anlauf at gcc dot gnu.org
2022-11-14 18:22 ` anlauf at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-11-14 18:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107679
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
Priority|P3 |P4
Last reconfirmed| |2022-11-14
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Target Milestone|--- |13.0
--- Comment #1 from anlauf at gcc dot gnu.org ---
Confirmed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/107679] [13 Regression] ICE in maybe_register_def, at tree-into-ssa.cc:1914
2022-11-14 17:25 [Bug fortran/107679] New: [13 Regression] ICE in maybe_register_def, at tree-into-ssa.cc:1914 gscfq@t-online.de
2022-11-14 18:07 ` [Bug fortran/107679] " anlauf at gcc dot gnu.org
@ 2022-11-14 18:22 ` anlauf at gcc dot gnu.org
2022-11-16 12:55 ` [Bug middle-end/107679] " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-11-14 18:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107679
--- Comment #2 from anlauf at gcc dot gnu.org ---
Interesting. Adding a line
print *, z
after the call
call s1(z)
make the ICE go away.
Is it the CLOBBER that confuses us?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/107679] [13 Regression] ICE in maybe_register_def, at tree-into-ssa.cc:1914
2022-11-14 17:25 [Bug fortran/107679] New: [13 Regression] ICE in maybe_register_def, at tree-into-ssa.cc:1914 gscfq@t-online.de
2022-11-14 18:07 ` [Bug fortran/107679] " anlauf at gcc dot gnu.org
2022-11-14 18:22 ` anlauf at gcc dot gnu.org
@ 2022-11-16 12:55 ` rguenth at gcc dot gnu.org
2022-11-16 16:07 ` cvs-commit at gcc dot gnu.org
2022-11-17 7:50 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-11-16 12:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107679
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|fortran |middle-end
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Status|NEW |ASSIGNED
Priority|P4 |P3
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Kind-of, yes. Somehow 'z' got marked for renaming, probably because we removed
a TREE_ADDRESABLE flag. The SSA rewrite wants to replace
<bb 2> [local count: 1073741824]:
z ={v} {CLOBBER};
return;
with an "uninitialized" def, but for PARM_DECLs the default def would be
the actual parameter value. There's nothing wrong with clobbering 'z'
I think, just the into-ssa code isn't prepared for this - the fix would be
to create an anonymous default def in this case.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/107679] [13 Regression] ICE in maybe_register_def, at tree-into-ssa.cc:1914
2022-11-14 17:25 [Bug fortran/107679] New: [13 Regression] ICE in maybe_register_def, at tree-into-ssa.cc:1914 gscfq@t-online.de
` (2 preceding siblings ...)
2022-11-16 12:55 ` [Bug middle-end/107679] " rguenth at gcc dot gnu.org
@ 2022-11-16 16:07 ` cvs-commit at gcc dot gnu.org
2022-11-17 7:50 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-11-16 16:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107679
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:8a5f3663f8de45b7030dfe7ce962783dc1a19885
commit r13-4101-g8a5f3663f8de45b7030dfe7ce962783dc1a19885
Author: Richard Biener <rguenther@suse.de>
Date: Wed Nov 16 13:57:14 2022 +0100
middle-end/107679 - fix SSA rewrite of clobber of parameter
When the frontend clobbers a parameter and that parameter gets
rewritten into SSA then we ICE because we didn't expect this. Avoid
using the parameter decl to create a SSA default def in this case.
PR middle-end/107679
* tree-into-ssa.cc (maybe_register_def): Use new temporary if
we require an uninitialized value for a parameter decl.
* gfortran.dg/pr107679.f90: New testcase.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/107679] [13 Regression] ICE in maybe_register_def, at tree-into-ssa.cc:1914
2022-11-14 17:25 [Bug fortran/107679] New: [13 Regression] ICE in maybe_register_def, at tree-into-ssa.cc:1914 gscfq@t-online.de
` (3 preceding siblings ...)
2022-11-16 16:07 ` cvs-commit at gcc dot gnu.org
@ 2022-11-17 7:50 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-11-17 7:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107679
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-11-17 7:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-14 17:25 [Bug fortran/107679] New: [13 Regression] ICE in maybe_register_def, at tree-into-ssa.cc:1914 gscfq@t-online.de
2022-11-14 18:07 ` [Bug fortran/107679] " anlauf at gcc dot gnu.org
2022-11-14 18:22 ` anlauf at gcc dot gnu.org
2022-11-16 12:55 ` [Bug middle-end/107679] " rguenth at gcc dot gnu.org
2022-11-16 16:07 ` cvs-commit at gcc dot gnu.org
2022-11-17 7:50 ` rguenth 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).