public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99007] New: [11 Regression] ICE in dominated_by_p, at dominance.c:1124
@ 2021-02-08 18:14 gscfq@t-online.de
2021-02-08 18:19 ` [Bug c++/99007] " jakub at gcc dot gnu.org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: gscfq@t-online.de @ 2021-02-08 18:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99007
Bug ID: 99007
Summary: [11 Regression] ICE in dominated_by_p, at
dominance.c:1124
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Started between 20201018 and 20201108 :
$ cat z1.cc
template <typename T> void bar (T *)
{
T s[0/0];
#pragma omp teams distribute parallel for reduction(+:s) allocate(s)
for (int i = 0; i < 8; i++);
}
void foo ()
{
long *a;
bar (a);
}
$ g++-11-20210207 -c z1.cc -fopenmp
z1.cc: In function 'void bar(T*)':
z1.cc:3:8: warning: division by zero [-Wdiv-by-zero]
3 | T s[0/0];
| ~^~
z1.cc: In instantiation of 'void bar(T*) [with T = long int]':
z1.cc:10:9: required from here
z1.cc:3:8: warning: division by zero [-Wdiv-by-zero]
during GIMPLE pass: ssa
z1.cc: In function '_Z3barIlEvPT_._omp_fn.0':
z1.cc:11:1: internal compiler error: Segmentation fault
11 | }
| ^
0xfe6cdf crash_signal
../../gcc/toplev.c:327
0xb6e764 dominated_by_p(cdi_direction, basic_block_def const*, basic_block_def
const*)
../../gcc/dominance.c:1124
0x1259775 verify_use
../../gcc/tree-ssa.c:892
0x125e462 verify_ssa(bool, bool)
../../gcc/tree-ssa.c:1167
0xef8a87 execute_function_todo
../../gcc/passes.c:2049
0xef97f2 execute_todo
../../gcc/passes.c:2096
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/99007] [11 Regression] ICE in dominated_by_p, at dominance.c:1124
2021-02-08 18:14 [Bug c++/99007] New: [11 Regression] ICE in dominated_by_p, at dominance.c:1124 gscfq@t-online.de
@ 2021-02-08 18:19 ` jakub at gcc dot gnu.org
2021-02-09 14:57 ` jakub at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-08 18:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99007
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
Target Milestone|--- |11.0
Last reconfirmed| |2021-02-08
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with my r11-4710-g9649031577028310e853025672c71dfb500494f0 change when
allocate clause has been implemented for this.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/99007] [11 Regression] ICE in dominated_by_p, at dominance.c:1124
2021-02-08 18:14 [Bug c++/99007] New: [11 Regression] ICE in dominated_by_p, at dominance.c:1124 gscfq@t-online.de
2021-02-08 18:19 ` [Bug c++/99007] " jakub at gcc dot gnu.org
@ 2021-02-09 14:57 ` jakub at gcc dot gnu.org
2021-02-09 15:26 ` [Bug middle-end/99007] " jakub at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-09 14:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99007
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Simplified testcase, no need for templates, and no need for UB in the code and
no need for C++:
void
bar (int n)
{
long s[n];
#pragma omp teams distribute parallel for reduction(+:s) allocate(s)
for (int i = 0; i < 8; i++)
;
}
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/99007] [11 Regression] ICE in dominated_by_p, at dominance.c:1124
2021-02-08 18:14 [Bug c++/99007] New: [11 Regression] ICE in dominated_by_p, at dominance.c:1124 gscfq@t-online.de
2021-02-08 18:19 ` [Bug c++/99007] " jakub at gcc dot gnu.org
2021-02-09 14:57 ` jakub at gcc dot gnu.org
@ 2021-02-09 15:26 ` jakub at gcc dot gnu.org
2021-02-09 16:30 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-09 15:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99007
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
And allocate clause isn't needed either, this ICEs since
r9-3941-g28567c40e2c7c88e424283e8a1a6ff8cb7ba440c
when host teams has been introduced:
int
bar (int n)
{
int s[n];
int i, j;
for (i = 0; i < n; i++)
s[i] = 0;
#pragma omp teams distribute parallel for reduction(+:s) private (j)
for (i = 0; i < 8; i++)
for (j = 0; j < n; j++)
s[j] += i;
return s[0] + s[n - 1];
}
and
int
bar (int n)
{
int s[n];
int i, j;
for (i = 0; i < n; i++)
s[i] = 0;
#pragma omp parallel reduction(+:s) num_threads(2)
#pragma omp parallel for reduction(+:s) private (j)
for (i = 0; i < 8; i++)
for (j = 0; j < n; j++)
s[j] += i;
return s[0] + s[n - 1];
}
ICEs since r7-536-g381cdae49785fc4b1941a6b37bad3e8c6f3f428d
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/99007] [11 Regression] ICE in dominated_by_p, at dominance.c:1124
2021-02-08 18:14 [Bug c++/99007] New: [11 Regression] ICE in dominated_by_p, at dominance.c:1124 gscfq@t-online.de
` (2 preceding siblings ...)
2021-02-09 15:26 ` [Bug middle-end/99007] " jakub at gcc dot gnu.org
@ 2021-02-09 16:30 ` jakub at gcc dot gnu.org
2021-02-10 9:42 ` cvs-commit at gcc dot gnu.org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-09 16:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99007
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 50152
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50152&action=edit
gcc11-pr99007.patch
Untested fix.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/99007] [11 Regression] ICE in dominated_by_p, at dominance.c:1124
2021-02-08 18:14 [Bug c++/99007] New: [11 Regression] ICE in dominated_by_p, at dominance.c:1124 gscfq@t-online.de
` (3 preceding siblings ...)
2021-02-09 16:30 ` jakub at gcc dot gnu.org
@ 2021-02-10 9:42 ` cvs-commit at gcc dot gnu.org
2021-02-10 14:46 ` [Bug middle-end/99007] [8/9/10 " jakub at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-10 9:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99007
--- Comment #5 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:bd0e37f68a3aed944df4eb739a0734bb87153749
commit r11-7167-gbd0e37f68a3aed944df4eb739a0734bb87153749
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Feb 10 10:34:58 2021 +0100
openmp: Temporarily disable into_ssa when gimplifying OpenMP reduction
clauses [PR99007]
gimplify_scan_omp_clauses was already calling gimplify_expr with false as
last argument to make sure it is not an SSA_NAME, but as the testcases
show,
that is not enough, SSA_NAME temporaries created during that gimplification
can be reused too and we can't allow SSA_NAMEs to be used across OpenMP
region boundaries, as we can only firstprivatize decls.
Fixed by temporarily disabling into_ssa.
2021-02-10 Jakub Jelinek <jakub@redhat.com>
PR middle-end/99007
* gimplify.c (gimplify_scan_omp_clauses): For MEM_REF on
reductions,
temporarily disable gimplify_ctxp->into_ssa around gimplify_expr
calls.
* g++.dg/gomp/pr99007.C: New test.
* gcc.dg/gomp/pr99007-1.c: New test.
* gcc.dg/gomp/pr99007-2.c: New test.
* gcc.dg/gomp/pr99007-3.c: New test.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/99007] [8/9/10 Regression] ICE in dominated_by_p, at dominance.c:1124
2021-02-08 18:14 [Bug c++/99007] New: [11 Regression] ICE in dominated_by_p, at dominance.c:1124 gscfq@t-online.de
` (4 preceding siblings ...)
2021-02-10 9:42 ` cvs-commit at gcc dot gnu.org
@ 2021-02-10 14:46 ` jakub at gcc dot gnu.org
2021-02-10 14:46 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-10 14:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99007
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.0 |8.5
Summary|[11 Regression] ICE in |[8/9/10 Regression] ICE in
|dominated_by_p, at |dominated_by_p, at
|dominance.c:1124 |dominance.c:1124
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk so far.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/99007] [8/9/10 Regression] ICE in dominated_by_p, at dominance.c:1124
2021-02-08 18:14 [Bug c++/99007] New: [11 Regression] ICE in dominated_by_p, at dominance.c:1124 gscfq@t-online.de
` (5 preceding siblings ...)
2021-02-10 14:46 ` [Bug middle-end/99007] [8/9/10 " jakub at gcc dot gnu.org
@ 2021-02-10 14:46 ` jakub at gcc dot gnu.org
2021-03-19 23:28 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-10 14:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99007
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/99007] [8/9/10 Regression] ICE in dominated_by_p, at dominance.c:1124
2021-02-08 18:14 [Bug c++/99007] New: [11 Regression] ICE in dominated_by_p, at dominance.c:1124 gscfq@t-online.de
` (6 preceding siblings ...)
2021-02-10 14:46 ` jakub at gcc dot gnu.org
@ 2021-03-19 23:28 ` cvs-commit at gcc dot gnu.org
2021-03-20 8:07 ` [Bug middle-end/99007] [8/9 " jakub at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-19 23:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99007
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:deba6b20a3889aa23f0e4b3a5248de4172a0167d
commit r10-9465-gdeba6b20a3889aa23f0e4b3a5248de4172a0167d
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Feb 10 10:34:58 2021 +0100
openmp: Temporarily disable into_ssa when gimplifying OpenMP reduction
clauses [PR99007]
gimplify_scan_omp_clauses was already calling gimplify_expr with false as
last argument to make sure it is not an SSA_NAME, but as the testcases
show,
that is not enough, SSA_NAME temporaries created during that gimplification
can be reused too and we can't allow SSA_NAMEs to be used across OpenMP
region boundaries, as we can only firstprivatize decls.
Fixed by temporarily disabling into_ssa.
2021-02-10 Jakub Jelinek <jakub@redhat.com>
PR middle-end/99007
* gimplify.c (gimplify_scan_omp_clauses): For MEM_REF on
reductions,
temporarily disable gimplify_ctxp->into_ssa around gimplify_expr
calls.
* g++.dg/gomp/pr99007.C: New test.
* gcc.dg/gomp/pr99007-1.c: New test.
* gcc.dg/gomp/pr99007-2.c: New test.
* gcc.dg/gomp/pr99007-3.c: New test.
(cherry picked from commit bd0e37f68a3aed944df4eb739a0734bb87153749)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/99007] [8/9 Regression] ICE in dominated_by_p, at dominance.c:1124
2021-02-08 18:14 [Bug c++/99007] New: [11 Regression] ICE in dominated_by_p, at dominance.c:1124 gscfq@t-online.de
` (7 preceding siblings ...)
2021-03-19 23:28 ` cvs-commit at gcc dot gnu.org
@ 2021-03-20 8:07 ` jakub at gcc dot gnu.org
2021-04-20 23:32 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-03-20 8:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99007
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[8/9/10 Regression] ICE in |[8/9 Regression] ICE in
|dominated_by_p, at |dominated_by_p, at
|dominance.c:1124 |dominance.c:1124
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 10.3 too.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/99007] [8/9 Regression] ICE in dominated_by_p, at dominance.c:1124
2021-02-08 18:14 [Bug c++/99007] New: [11 Regression] ICE in dominated_by_p, at dominance.c:1124 gscfq@t-online.de
` (8 preceding siblings ...)
2021-03-20 8:07 ` [Bug middle-end/99007] [8/9 " jakub at gcc dot gnu.org
@ 2021-04-20 23:32 ` cvs-commit at gcc dot gnu.org
2021-04-22 16:50 ` cvs-commit at gcc dot gnu.org
2021-04-22 17:11 ` jakub at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-20 23:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99007
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:024f7908cbdd82e4e23a06e6df47f3823e8bdf59
commit r9-9417-g024f7908cbdd82e4e23a06e6df47f3823e8bdf59
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Feb 10 10:34:58 2021 +0100
openmp: Temporarily disable into_ssa when gimplifying OpenMP reduction
clauses [PR99007]
gimplify_scan_omp_clauses was already calling gimplify_expr with false as
last argument to make sure it is not an SSA_NAME, but as the testcases
show,
that is not enough, SSA_NAME temporaries created during that gimplification
can be reused too and we can't allow SSA_NAMEs to be used across OpenMP
region boundaries, as we can only firstprivatize decls.
Fixed by temporarily disabling into_ssa.
2021-02-10 Jakub Jelinek <jakub@redhat.com>
PR middle-end/99007
* gimplify.c (gimplify_scan_omp_clauses): For MEM_REF on
reductions,
temporarily disable gimplify_ctxp->into_ssa around gimplify_expr
calls.
* g++.dg/gomp/pr99007.C: New test.
* gcc.dg/gomp/pr99007-1.c: New test.
* gcc.dg/gomp/pr99007-2.c: New test.
* gcc.dg/gomp/pr99007-3.c: New test.
(cherry picked from commit deba6b20a3889aa23f0e4b3a5248de4172a0167d)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/99007] [8/9 Regression] ICE in dominated_by_p, at dominance.c:1124
2021-02-08 18:14 [Bug c++/99007] New: [11 Regression] ICE in dominated_by_p, at dominance.c:1124 gscfq@t-online.de
` (9 preceding siblings ...)
2021-04-20 23:32 ` cvs-commit at gcc dot gnu.org
@ 2021-04-22 16:50 ` cvs-commit at gcc dot gnu.org
2021-04-22 17:11 ` jakub at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-22 16:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99007
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:5dfeb10fd2d21eebf329272cce687ad34c2ae2a9
commit r8-10882-g5dfeb10fd2d21eebf329272cce687ad34c2ae2a9
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Feb 10 10:34:58 2021 +0100
openmp: Temporarily disable into_ssa when gimplifying OpenMP reduction
clauses [PR99007]
gimplify_scan_omp_clauses was already calling gimplify_expr with false as
last argument to make sure it is not an SSA_NAME, but as the testcases
show,
that is not enough, SSA_NAME temporaries created during that gimplification
can be reused too and we can't allow SSA_NAMEs to be used across OpenMP
region boundaries, as we can only firstprivatize decls.
Fixed by temporarily disabling into_ssa.
2021-02-10 Jakub Jelinek <jakub@redhat.com>
PR middle-end/99007
* gimplify.c (gimplify_scan_omp_clauses): For MEM_REF on
reductions,
temporarily disable gimplify_ctxp->into_ssa around gimplify_expr
calls.
* g++.dg/gomp/pr99007.C: New test.
* gcc.dg/gomp/pr99007-1.c: New test.
* gcc.dg/gomp/pr99007-2.c: New test.
* gcc.dg/gomp/pr99007-3.c: New test.
(cherry picked from commit deba6b20a3889aa23f0e4b3a5248de4172a0167d)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/99007] [8/9 Regression] ICE in dominated_by_p, at dominance.c:1124
2021-02-08 18:14 [Bug c++/99007] New: [11 Regression] ICE in dominated_by_p, at dominance.c:1124 gscfq@t-online.de
` (10 preceding siblings ...)
2021-04-22 16:50 ` cvs-commit at gcc dot gnu.org
@ 2021-04-22 17:11 ` jakub at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-22 17:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99007
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2021-04-22 17:11 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-08 18:14 [Bug c++/99007] New: [11 Regression] ICE in dominated_by_p, at dominance.c:1124 gscfq@t-online.de
2021-02-08 18:19 ` [Bug c++/99007] " jakub at gcc dot gnu.org
2021-02-09 14:57 ` jakub at gcc dot gnu.org
2021-02-09 15:26 ` [Bug middle-end/99007] " jakub at gcc dot gnu.org
2021-02-09 16:30 ` jakub at gcc dot gnu.org
2021-02-10 9:42 ` cvs-commit at gcc dot gnu.org
2021-02-10 14:46 ` [Bug middle-end/99007] [8/9/10 " jakub at gcc dot gnu.org
2021-02-10 14:46 ` jakub at gcc dot gnu.org
2021-03-19 23:28 ` cvs-commit at gcc dot gnu.org
2021-03-20 8:07 ` [Bug middle-end/99007] [8/9 " jakub at gcc dot gnu.org
2021-04-20 23:32 ` cvs-commit at gcc dot gnu.org
2021-04-22 16:50 ` cvs-commit at gcc dot gnu.org
2021-04-22 17:11 ` 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).