* [Bug c++/98072] [11 Regression] ICE in cp_parser_omp_var_list_no_open, at cp/parser.c:34843
2020-12-01 2:43 [Bug c++/98072] New: [11 Regression] ICE in cp_parser_omp_var_list_no_open, at cp/parser.c:34843 asolokha at gmx dot com
@ 2020-12-01 8:22 ` rguenth at gcc dot gnu.org
2020-12-01 9:33 ` [Bug c++/98072] [9/10/11 " jakub at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-12-01 8:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98072
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/98072] [9/10/11 Regression] ICE in cp_parser_omp_var_list_no_open, at cp/parser.c:34843
2020-12-01 2:43 [Bug c++/98072] New: [11 Regression] ICE in cp_parser_omp_var_list_no_open, at cp/parser.c:34843 asolokha at gmx dot com
2020-12-01 8:22 ` [Bug c++/98072] " rguenth at gcc dot gnu.org
@ 2020-12-01 9:33 ` jakub at gcc dot gnu.org
2020-12-01 9:42 ` jakub at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-12-01 9:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98072
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-invalid-code |ice-checking
CC| |jakub at gcc dot gnu.org,
| |tschwinge at gcc dot gnu.org
Priority|P3 |P1
Summary|[11 Regression] ICE in |[9/10/11 Regression] ICE in
|cp_parser_omp_var_list_no_o |cp_parser_omp_var_list_no_o
|pen, at cp/parser.c:34843 |pen, at cp/parser.c:34843
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
ICEs even when the testcase is turned into valid one:
typedef struct __attribute__((__aligned__ (sizeof (void *)))) omp_depend_t {
char __omp_depend_t__[2 * sizeof (void *)];
} omp_depend_t;
void
foo (int *x, omp_depend_t *y, int z)
{
#pragma omp depobj (*y) depend (in: x[z])
}
Started with
r11-5430-gc0c7270cc4efd896fe99f8ad5409dbef089a407f but that change has been
backported to 10 and 9 branches too.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/98072] [9/10/11 Regression] ICE in cp_parser_omp_var_list_no_open, at cp/parser.c:34843
2020-12-01 2:43 [Bug c++/98072] New: [11 Regression] ICE in cp_parser_omp_var_list_no_open, at cp/parser.c:34843 asolokha at gmx dot com
2020-12-01 8:22 ` [Bug c++/98072] " rguenth at gcc dot gnu.org
2020-12-01 9:33 ` [Bug c++/98072] [9/10/11 " jakub at gcc dot gnu.org
@ 2020-12-01 9:42 ` jakub at gcc dot gnu.org
2020-12-01 10:33 ` tschwinge at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-12-01 9:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98072
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Ever confirmed|0 |1
Last reconfirmed| |2020-12-01
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 49656
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49656&action=edit
gcc11-pr98072.patch
Untested fix. The ultimate right fix is of course get rid of these sentinels
from OpenMP/OpenACC parsing and deal with location wrappers when handling the
clauses.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/98072] [9/10/11 Regression] ICE in cp_parser_omp_var_list_no_open, at cp/parser.c:34843
2020-12-01 2:43 [Bug c++/98072] New: [11 Regression] ICE in cp_parser_omp_var_list_no_open, at cp/parser.c:34843 asolokha at gmx dot com
` (2 preceding siblings ...)
2020-12-01 9:42 ` jakub at gcc dot gnu.org
@ 2020-12-01 10:33 ` tschwinge at gcc dot gnu.org
2020-12-01 20:46 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2020-12-01 10:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98072
Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dmalcolm at gcc dot gnu.org
--- Comment #3 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
(In reply to Arseny Solokha from comment #0)
> g++-11.0.0-alpha20201129 snapshot
> (g:bb67ad5cff58a707aaae645d4f45a913d8511c86) ICEs when compiling the
> following testcase, reduced from test/OpenMP/depobj_ast_print.cpp from the
> clang 11.0.0 test suite, w/ -fopenmp:
Thanks for doing such testing.
> % g++-11.0.0 -fopenmp -c wmttbiko.cpp
> wmttbiko.cpp: In function 'void dh(int*, int, int)':
> wmttbiko.cpp:4:65: internal compiler error: in
> cp_parser_omp_var_list_no_open, at cp/parser.c:34843
> 4 | #pragma omp depobj (pm) depend (iterator (ca = 0 : *vp), in: vp[ca])
> | ^~
> 0x9e4b1b cp_parser_omp_var_list_no_open
> /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201129/work/gcc-11-20201129/
> gcc/cp/parser.c:34843
> 0x9ec406 cp_parser_omp_clause_depend
> /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201129/work/gcc-11-20201129/
> The failing assert has been introduced in
> g:c0c7270cc4efd896fe99f8ad5409dbef089a407f.
ACK, and that means (a) missing testsuite coverage, and (b) likely mis-handling
these clauses (at least concerning validity checking, diagnostics) -- so, I'm
glad that the 'assert' has found this additional case.
(In reply to Jakub Jelinek from comment #2)
> Created attachment 49656 [details]
> gcc11-pr98072.patch
>
> Untested fix.
ACK. I suggest you also add the standard source code comment that we use in
other similar places.
Alternatively (separate change), I wondered whether we might actually move the
sentinel into 'cp_parser_omp_var_list_no_open', supposing that's the one only
place where this matters? (But I haven't verified that.)
> The ultimate right fix is of course get rid of these
> sentinels from OpenMP/OpenACC parsing and deal with location wrappers when
> handling the clauses.
ACK. (Or, get rid of (this implementation of) these explicit location wrapper
nodes. I understand the intention behind the location wrappers, but maybe this
should be implemented differently?)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/98072] [9/10/11 Regression] ICE in cp_parser_omp_var_list_no_open, at cp/parser.c:34843
2020-12-01 2:43 [Bug c++/98072] New: [11 Regression] ICE in cp_parser_omp_var_list_no_open, at cp/parser.c:34843 asolokha at gmx dot com
` (3 preceding siblings ...)
2020-12-01 10:33 ` tschwinge at gcc dot gnu.org
@ 2020-12-01 20:46 ` cvs-commit at gcc dot gnu.org
2020-12-02 18:11 ` [Bug c++/98072] [9/10 " jakub at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-01 20:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98072
--- 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:91ddf867a57b028ab322b737ea8355d5a472cd44
commit r11-5623-g91ddf867a57b028ab322b737ea8355d5a472cd44
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Dec 1 21:41:44 2020 +0100
openmp: Avoid ICE on depend clause on depobj OpenMP construct [PR98072]
Since r11-5430 we ICE on the following testcase. When parsing the depobj
directive we don't really use cp_parser_omp_all_clauses routine which ATM
disables generation of location wrappers and the newly added assertion
that there are no location wrappers thus triggers.
Fixed by adding the location wrappers suppression sentinel.
Longer term, we should handle location wrappers inside of OpenMP clauses.
2020-12-01 Jakub Jelinek <jakub@redhat.com>
PR c++/98072
* parser.c (cp_parser_omp_depobj): Suppress location wrappers when
parsing depend clause.
* c-c++-common/gomp/depobj-2.c: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/98072] [9/10 Regression] ICE in cp_parser_omp_var_list_no_open, at cp/parser.c:34843
2020-12-01 2:43 [Bug c++/98072] New: [11 Regression] ICE in cp_parser_omp_var_list_no_open, at cp/parser.c:34843 asolokha at gmx dot com
` (4 preceding siblings ...)
2020-12-01 20:46 ` cvs-commit at gcc dot gnu.org
@ 2020-12-02 18:11 ` jakub at gcc dot gnu.org
2021-01-06 9:39 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-12-02 18:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98072
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[9/10/11 Regression] ICE in |[9/10 Regression] ICE in
|cp_parser_omp_var_list_no_o |cp_parser_omp_var_list_no_o
|pen, at cp/parser.c:34843 |pen, at cp/parser.c:34843
Target Milestone|11.0 |9.4
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk, needs to be backported to release branches where it
regressed since the latest released minor versions.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/98072] [9/10 Regression] ICE in cp_parser_omp_var_list_no_open, at cp/parser.c:34843
2020-12-01 2:43 [Bug c++/98072] New: [11 Regression] ICE in cp_parser_omp_var_list_no_open, at cp/parser.c:34843 asolokha at gmx dot com
` (5 preceding siblings ...)
2020-12-02 18:11 ` [Bug c++/98072] [9/10 " jakub at gcc dot gnu.org
@ 2021-01-06 9:39 ` cvs-commit at gcc dot gnu.org
2021-01-06 9:43 ` [Bug c++/98072] [9 " jakub at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-06 9:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98072
--- Comment #6 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:d62daad11b21a2ee9c39a43c5e94e7b966793dbd
commit r10-9212-gd62daad11b21a2ee9c39a43c5e94e7b966793dbd
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Dec 1 21:41:44 2020 +0100
openmp: Avoid ICE on depend clause on depobj OpenMP construct [PR98072]
Since r11-5430 we ICE on the following testcase. When parsing the depobj
directive we don't really use cp_parser_omp_all_clauses routine which ATM
disables generation of location wrappers and the newly added assertion
that there are no location wrappers thus triggers.
Fixed by adding the location wrappers suppression sentinel.
Longer term, we should handle location wrappers inside of OpenMP clauses.
2020-12-01 Jakub Jelinek <jakub@redhat.com>
PR c++/98072
* parser.c (cp_parser_omp_depobj): Suppress location wrappers when
parsing depend clause.
* c-c++-common/gomp/depobj-2.c: New test.
(cherry picked from commit 91ddf867a57b028ab322b737ea8355d5a472cd44)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/98072] [9 Regression] ICE in cp_parser_omp_var_list_no_open, at cp/parser.c:34843
2020-12-01 2:43 [Bug c++/98072] New: [11 Regression] ICE in cp_parser_omp_var_list_no_open, at cp/parser.c:34843 asolokha at gmx dot com
` (6 preceding siblings ...)
2021-01-06 9:39 ` cvs-commit at gcc dot gnu.org
@ 2021-01-06 9:43 ` jakub at gcc dot gnu.org
2021-04-20 23:30 ` cvs-commit at gcc dot gnu.org
2021-04-22 13:27 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-01-06 9:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98072
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[9/10 Regression] ICE in |[9 Regression] ICE in
|cp_parser_omp_var_list_no_o |cp_parser_omp_var_list_no_o
|pen, at cp/parser.c:34843 |pen, at cp/parser.c:34843
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 10.3+ too.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/98072] [9 Regression] ICE in cp_parser_omp_var_list_no_open, at cp/parser.c:34843
2020-12-01 2:43 [Bug c++/98072] New: [11 Regression] ICE in cp_parser_omp_var_list_no_open, at cp/parser.c:34843 asolokha at gmx dot com
` (7 preceding siblings ...)
2021-01-06 9:43 ` [Bug c++/98072] [9 " jakub at gcc dot gnu.org
@ 2021-04-20 23:30 ` cvs-commit at gcc dot gnu.org
2021-04-22 13:27 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-20 23:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98072
--- Comment #8 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:705afe9b40aabbe395baa2979cdac0a9fef194ef
commit r9-9396-g705afe9b40aabbe395baa2979cdac0a9fef194ef
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Dec 1 21:41:44 2020 +0100
openmp: Avoid ICE on depend clause on depobj OpenMP construct [PR98072]
Since r11-5430 we ICE on the following testcase. When parsing the depobj
directive we don't really use cp_parser_omp_all_clauses routine which ATM
disables generation of location wrappers and the newly added assertion
that there are no location wrappers thus triggers.
Fixed by adding the location wrappers suppression sentinel.
Longer term, we should handle location wrappers inside of OpenMP clauses.
2020-12-01 Jakub Jelinek <jakub@redhat.com>
PR c++/98072
* parser.c (cp_parser_omp_depobj): Suppress location wrappers when
parsing depend clause.
* c-c++-common/gomp/depobj-2.c: New test.
(cherry picked from commit d62daad11b21a2ee9c39a43c5e94e7b966793dbd)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/98072] [9 Regression] ICE in cp_parser_omp_var_list_no_open, at cp/parser.c:34843
2020-12-01 2:43 [Bug c++/98072] New: [11 Regression] ICE in cp_parser_omp_var_list_no_open, at cp/parser.c:34843 asolokha at gmx dot com
` (8 preceding siblings ...)
2021-04-20 23:30 ` cvs-commit at gcc dot gnu.org
@ 2021-04-22 13:27 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-22 13:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98072
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 11+ messages in thread