public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/102940] New: ICE: Segmentation fault (in gimple_bb)
@ 2021-10-26 6:04 asolokha at gmx dot com
2021-10-26 6:12 ` [Bug tree-optimization/102940] " pinskia at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: asolokha at gmx dot com @ 2021-10-26 6:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102940
Bug ID: 102940
Summary: ICE: Segmentation fault (in gimple_bb)
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, openacc
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
gcc-12.0.0-alpha20211024 snapshot (g:3f861a5c8fd6dcc32cdaa800156a5e1b3724f4c3)
ICEs when compiling libgomp/testsuite/libgomp.oacc-c-c++-common/broadcast-1.c
w/ -O2 -fopenacc -fno-tree-forwprop -Warray-bounds=1 --param vrp1-mode=ranger:
% gcc-12.0.0 -O2 -fopenacc -fno-tree-forwprop -Warray-bounds=1 --param
vrp1-mode=ranger -c libgomp/testsuite/libgomp.oacc-c-c++-common/broadcast-1.c
during GIMPLE pass: vrp
libgomp/testsuite/libgomp.oacc-c-c++-common/broadcast-1.c: In function
'test._omp_fn.0':
libgomp/testsuite/libgomp.oacc-c-c++-common/broadcast-1.c:14:9: internal
compiler error: Segmentation fault
14 | #pragma acc parallel num_gangs(16) num_workers(4) vector_length(32)
copyout(A)
| ^~~
0xe9c3df crash_signal
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211024/work/gcc-12-20211024/gcc/toplev.c:322
0xf8077e gimple_bb
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211024/work/gcc-12-20211024/gcc/gimple.h:1869
0xf8077e instantiate_scev_name
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211024/work/gcc-12-20211024/gcc/tree-scalar-evolution.c:2262
0xf8077e instantiate_scev_r
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211024/work/gcc-12-20211024/gcc/tree-scalar-evolution.c:2636
0xf80647 instantiate_scev_poly
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211024/work/gcc-12-20211024/gcc/tree-scalar-evolution.c:2416
0xf80647 instantiate_scev_r
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211024/work/gcc-12-20211024/gcc/tree-scalar-evolution.c:2641
0xf8127b instantiate_scev(edge_def*, loop*, tree_node*)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211024/work/gcc-12-20211024/gcc/tree-scalar-evolution.c:2718
0x1206796 instantiate_parameters
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211024/work/gcc-12-20211024/gcc/tree-scalar-evolution.h:63
0x1206796 bounds_of_var_in_loop(tree_node**, tree_node**, range_query*, loop*,
gimple*, tree_node*)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211024/work/gcc-12-20211024/gcc/vr-values.c:1644
0x1b6bc2d fold_using_range::range_of_ssa_name_with_loop_info(irange&,
tree_node*, loop*, gphi*, fur_source&)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211024/work/gcc-12-20211024/gcc/gimple-range-fold.cc:1276
0x1b6c170 fold_using_range::range_of_phi(irange&, gphi*, fur_source&)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211024/work/gcc-12-20211024/gcc/gimple-range-fold.cc:831
0x1b6e3e0 fold_using_range::fold_stmt(irange&, gimple*, fur_source&,
tree_node*)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211024/work/gcc-12-20211024/gcc/gimple-range-fold.cc:554
0x1b62139 gimple_ranger::fold_range_internal(irange&, gimple*, tree_node*)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211024/work/gcc-12-20211024/gcc/gimple-range.cc:230
0x1b62139 gimple_ranger::range_of_stmt(irange&, gimple*, tree_node*)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211024/work/gcc-12-20211024/gcc/gimple-range.cc:273
0x1b6236c gimple_ranger::range_on_entry(irange&, basic_block_def*, tree_node*)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211024/work/gcc-12-20211024/gcc/gimple-range.cc:128
0x1b62b92 gimple_ranger::range_of_expr(irange&, tree_node*, gimple*)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211024/work/gcc-12-20211024/gcc/gimple-range.cc:105
0x11b81be range_query::get_value_range(tree_node const*, gimple*)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211024/work/gcc-12-20211024/gcc/value-query.cc:169
0x1b46b8d array_bounds_checker::get_value_range(tree_node const*, gimple*)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211024/work/gcc-12-20211024/gcc/gimple-array-bounds.cc:48
0x1b46b8d array_bounds_checker::check_array_ref(unsigned int, tree_node*,
gimple*, bool)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211024/work/gcc-12-20211024/gcc/gimple-array-bounds.cc:290
0x1b488ab array_bounds_checker::check_array_ref(unsigned int, tree_node*,
gimple*, bool)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211024/work/gcc-12-20211024/gcc/gimple-array-bounds.cc:761
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/102940] ICE: Segmentation fault (in gimple_bb)
2021-10-26 6:04 [Bug tree-optimization/102940] New: ICE: Segmentation fault (in gimple_bb) asolokha at gmx dot com
@ 2021-10-26 6:12 ` pinskia at gcc dot gnu.org
2021-10-26 6:44 ` [Bug tree-optimization/102940] [12 Regression] " marxin at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-26 6:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102940
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
CC| |pinskia at gcc dot gnu.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/102940] [12 Regression] ICE: Segmentation fault (in gimple_bb)
2021-10-26 6:04 [Bug tree-optimization/102940] New: ICE: Segmentation fault (in gimple_bb) asolokha at gmx dot com
2021-10-26 6:12 ` [Bug tree-optimization/102940] " pinskia at gcc dot gnu.org
@ 2021-10-26 6:44 ` marxin at gcc dot gnu.org
2021-10-26 7:21 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-26 6:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102940
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2021-10-26
CC| |aldyh at gcc dot gnu.org,
| |amacleod at redhat dot com,
| |marxin at gcc dot gnu.org
Status|UNCONFIRMED |NEW
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/102940] [12 Regression] ICE: Segmentation fault (in gimple_bb)
2021-10-26 6:04 [Bug tree-optimization/102940] New: ICE: Segmentation fault (in gimple_bb) asolokha at gmx dot com
2021-10-26 6:12 ` [Bug tree-optimization/102940] " pinskia at gcc dot gnu.org
2021-10-26 6:44 ` [Bug tree-optimization/102940] [12 Regression] " marxin at gcc dot gnu.org
@ 2021-10-26 7:21 ` rguenth at gcc dot gnu.org
2021-10-28 14:50 ` cvs-commit at gcc dot gnu.org
2021-10-28 14:52 ` amacleod at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-26 7:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102940
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aldyh at gcc dot gnu.org
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
It looks like ranger dives into stmts not in the IL or freed.
(gdb) p debug_tree (chrec)
<ssa_name 0x7ffff63a5b40 type <error_mark 0x7ffff6543d20>
nothrow
def_stmt
version:96 in-free-list>
in fact, execute_ranger_vrp calls the array bound checker after substitute &
fold
which removes stmts and releases SSA names but it fails to clear the SCEV cache
which the array bound checker happily looks at. The following fixes this.
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index ba7a4efc7c6..c1abee25feb 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -4425,6 +4425,7 @@ execute_ranger_vrp (struct function *fun, bool
warn_array_bounds_p)
else
e->flags |= EDGE_EXECUTABLE;
}
+ scev_reset ();
array_bounds_checker array_checker (fun, ranger);
array_checker.check ();
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/102940] [12 Regression] ICE: Segmentation fault (in gimple_bb)
2021-10-26 6:04 [Bug tree-optimization/102940] New: ICE: Segmentation fault (in gimple_bb) asolokha at gmx dot com
` (2 preceding siblings ...)
2021-10-26 7:21 ` rguenth at gcc dot gnu.org
@ 2021-10-28 14:50 ` cvs-commit at gcc dot gnu.org
2021-10-28 14:52 ` amacleod at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-28 14:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102940
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Andrew Macleod <amacleod@gcc.gnu.org>:
https://gcc.gnu.org/g:d46aeb5906b8ed7ee255cfbacc5cf9d2f56b850c
commit r12-4773-gd46aeb5906b8ed7ee255cfbacc5cf9d2f56b850c
Author: Andrew MacLeod <amacleod@redhat.com>
Date: Tue Oct 26 14:43:33 2021 -0400
Reset scev before invoking array_checker.
Before invoking the array_checker, we need to reset scev so it will not try
to
access any ssa_names that the substitute and fold engine has freed.
PR tree-optimization/102940
* tree-vrp.c (execute_ranger_vrp): Reset scev.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/102940] [12 Regression] ICE: Segmentation fault (in gimple_bb)
2021-10-26 6:04 [Bug tree-optimization/102940] New: ICE: Segmentation fault (in gimple_bb) asolokha at gmx dot com
` (3 preceding siblings ...)
2021-10-28 14:50 ` cvs-commit at gcc dot gnu.org
@ 2021-10-28 14:52 ` amacleod at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: amacleod at redhat dot com @ 2021-10-28 14:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102940
Andrew Macleod <amacleod at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Andrew Macleod <amacleod at redhat dot com> ---
thanks. Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-10-28 14:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26 6:04 [Bug tree-optimization/102940] New: ICE: Segmentation fault (in gimple_bb) asolokha at gmx dot com
2021-10-26 6:12 ` [Bug tree-optimization/102940] " pinskia at gcc dot gnu.org
2021-10-26 6:44 ` [Bug tree-optimization/102940] [12 Regression] " marxin at gcc dot gnu.org
2021-10-26 7:21 ` rguenth at gcc dot gnu.org
2021-10-28 14:50 ` cvs-commit at gcc dot gnu.org
2021-10-28 14:52 ` amacleod at redhat dot com
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).