* [Bug c++/108607] [12/13 Regression] ICE in potential_constant_expression_1, at cp/constexpr.cc:10003
2023-01-30 20:09 [Bug c++/108607] New: [12/13 Regression] ICE in potential_constant_expression_1, at cp/constexpr.cc:10003 gscfq@t-online.de
@ 2023-01-31 8:52 ` rguenth at gcc dot gnu.org
2023-01-31 16:01 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-01-31 8:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108607
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.3
Keywords| |error-recovery
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/108607] [12/13 Regression] ICE in potential_constant_expression_1, at cp/constexpr.cc:10003
2023-01-30 20:09 [Bug c++/108607] New: [12/13 Regression] ICE in potential_constant_expression_1, at cp/constexpr.cc:10003 gscfq@t-online.de
2023-01-31 8:52 ` [Bug c++/108607] " rguenth at gcc dot gnu.org
@ 2023-01-31 16:01 ` jakub at gcc dot gnu.org
2023-02-01 9:43 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-01-31 16:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108607
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2023-01-31
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Status|UNCONFIRMED |ASSIGNED
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 54376
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54376&action=edit
gcc13-pr108607.patch
Untested fix.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/108607] [12/13 Regression] ICE in potential_constant_expression_1, at cp/constexpr.cc:10003
2023-01-30 20:09 [Bug c++/108607] New: [12/13 Regression] ICE in potential_constant_expression_1, at cp/constexpr.cc:10003 gscfq@t-online.de
2023-01-31 8:52 ` [Bug c++/108607] " rguenth at gcc dot gnu.org
2023-01-31 16:01 ` jakub at gcc dot gnu.org
@ 2023-02-01 9:43 ` cvs-commit at gcc dot gnu.org
2023-02-01 9:45 ` [Bug c++/108607] [12 " jakub at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-02-01 9:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108607
--- Comment #2 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:bfc070595bfb00abef88a002eee5d9117f5b86a7
commit r13-5621-gbfc070595bfb00abef88a002eee5d9117f5b86a7
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Feb 1 10:38:46 2023 +0100
c++, openmp: Handle some OMP_*/OACC_* constructs during constant expression
evaluation [PR108607]
While potential_constant_expression_1 handled most of OMP_* codes (by
saying that
they aren't potential constant expressions), OMP_SCOPE was missing in that
list.
I've also added OMP_SCAN, though that is less important (similarly to
OMP_SECTION
it ought to appear solely inside of OMP_{FOR,SIMD} resp. OMP_SECTIONS).
As the testcase shows, it isn't enough, potential_constant_expression_1
can catch only some cases, as soon as one uses switch or ifs where at least
one of the possible paths could be constant expression, we can run into the
same codes during cxx_eval_constant_expression, so this patch handles those
there as well.
2023-02-01 Jakub Jelinek <jakub@redhat.com>
PR c++/108607
* constexpr.cc (cxx_eval_constant_expression): Handle OMP_*
and OACC_* constructs as non-constant.
(potential_constant_expression_1): Handle OMP_SCAN and OMP_SCOPE.
* g++.dg/gomp/pr108607.C: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/108607] [12 Regression] ICE in potential_constant_expression_1, at cp/constexpr.cc:10003
2023-01-30 20:09 [Bug c++/108607] New: [12/13 Regression] ICE in potential_constant_expression_1, at cp/constexpr.cc:10003 gscfq@t-online.de
` (2 preceding siblings ...)
2023-02-01 9:43 ` cvs-commit at gcc dot gnu.org
@ 2023-02-01 9:45 ` jakub at gcc dot gnu.org
2023-02-10 17:46 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-01 9:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108607
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[12/13 Regression] ICE in |[12 Regression] ICE in
|potential_constant_expressi |potential_constant_expressi
|on_1, at |on_1, at
|cp/constexpr.cc:10003 |cp/constexpr.cc:10003
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk so far.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/108607] [12 Regression] ICE in potential_constant_expression_1, at cp/constexpr.cc:10003
2023-01-30 20:09 [Bug c++/108607] New: [12/13 Regression] ICE in potential_constant_expression_1, at cp/constexpr.cc:10003 gscfq@t-online.de
` (3 preceding siblings ...)
2023-02-01 9:45 ` [Bug c++/108607] [12 " jakub at gcc dot gnu.org
@ 2023-02-10 17:46 ` cvs-commit at gcc dot gnu.org
2023-02-10 18:01 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-02-10 17:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108607
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:a62d952064c896eaf94e70d7999e6e27343babcf
commit r12-9148-ga62d952064c896eaf94e70d7999e6e27343babcf
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Feb 1 10:38:46 2023 +0100
c++, openmp: Handle some OMP_*/OACC_* constructs during constant expression
evaluation [PR108607]
While potential_constant_expression_1 handled most of OMP_* codes (by
saying that
they aren't potential constant expressions), OMP_SCOPE was missing in that
list.
I've also added OMP_SCAN, though that is less important (similarly to
OMP_SECTION
it ought to appear solely inside of OMP_{FOR,SIMD} resp. OMP_SECTIONS).
As the testcase shows, it isn't enough, potential_constant_expression_1
can catch only some cases, as soon as one uses switch or ifs where at least
one of the possible paths could be constant expression, we can run into the
same codes during cxx_eval_constant_expression, so this patch handles those
there as well.
2023-02-01 Jakub Jelinek <jakub@redhat.com>
PR c++/108607
* constexpr.cc (cxx_eval_constant_expression): Handle OMP_*
and OACC_* constructs as non-constant.
(potential_constant_expression_1): Handle OMP_SCAN and OMP_SCOPE.
* g++.dg/gomp/pr108607.C: New test.
(cherry picked from commit bfc070595bfb00abef88a002eee5d9117f5b86a7)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/108607] [12 Regression] ICE in potential_constant_expression_1, at cp/constexpr.cc:10003
2023-01-30 20:09 [Bug c++/108607] New: [12/13 Regression] ICE in potential_constant_expression_1, at cp/constexpr.cc:10003 gscfq@t-online.de
` (4 preceding siblings ...)
2023-02-10 17:46 ` cvs-commit at gcc dot gnu.org
@ 2023-02-10 18:01 ` jakub at gcc dot gnu.org
2023-05-02 20:14 ` cvs-commit at gcc dot gnu.org
2023-05-03 15:21 ` cvs-commit at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-10 18:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108607
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 for gcc 12.3 too.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/108607] [12 Regression] ICE in potential_constant_expression_1, at cp/constexpr.cc:10003
2023-01-30 20:09 [Bug c++/108607] New: [12/13 Regression] ICE in potential_constant_expression_1, at cp/constexpr.cc:10003 gscfq@t-online.de
` (5 preceding siblings ...)
2023-02-10 18:01 ` jakub at gcc dot gnu.org
@ 2023-05-02 20:14 ` cvs-commit at gcc dot gnu.org
2023-05-03 15:21 ` cvs-commit at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-02 20:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108607
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:c5956b8cea7bf9b383a31af83e71f7cfc1a56bf1
commit r11-10705-gc5956b8cea7bf9b383a31af83e71f7cfc1a56bf1
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Feb 1 10:38:46 2023 +0100
c++, openmp: Handle some OMP_*/OACC_* constructs during constant expression
evaluation [PR108607]
While potential_constant_expression_1 handled most of OMP_* codes (by
saying that
they aren't potential constant expressions), OMP_SCOPE was missing in that
list.
I've also added OMP_SCAN, though that is less important (similarly to
OMP_SECTION
it ought to appear solely inside of OMP_{FOR,SIMD} resp. OMP_SECTIONS).
As the testcase shows, it isn't enough, potential_constant_expression_1
can catch only some cases, as soon as one uses switch or ifs where at least
one of the possible paths could be constant expression, we can run into the
same codes during cxx_eval_constant_expression, so this patch handles those
there as well.
2023-02-01 Jakub Jelinek <jakub@redhat.com>
PR c++/108607
* constexpr.c (cxx_eval_constant_expression): Handle OMP_*
and OACC_* constructs as non-constant.
(potential_constant_expression_1): Handle OMP_SCAN.
* g++.dg/gomp/pr108607.C: New test.
(cherry picked from commit bfc070595bfb00abef88a002eee5d9117f5b86a7)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/108607] [12 Regression] ICE in potential_constant_expression_1, at cp/constexpr.cc:10003
2023-01-30 20:09 [Bug c++/108607] New: [12/13 Regression] ICE in potential_constant_expression_1, at cp/constexpr.cc:10003 gscfq@t-online.de
` (6 preceding siblings ...)
2023-05-02 20:14 ` cvs-commit at gcc dot gnu.org
@ 2023-05-03 15:21 ` cvs-commit at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-03 15:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108607
--- 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:bd28648bf4923592462a938b31069a06ee39caea
commit r10-11360-gbd28648bf4923592462a938b31069a06ee39caea
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Feb 1 10:38:46 2023 +0100
c++, openmp: Handle some OMP_*/OACC_* constructs during constant expression
evaluation [PR108607]
While potential_constant_expression_1 handled most of OMP_* codes (by
saying that
they aren't potential constant expressions), OMP_SCOPE was missing in that
list.
I've also added OMP_SCAN, though that is less important (similarly to
OMP_SECTION
it ought to appear solely inside of OMP_{FOR,SIMD} resp. OMP_SECTIONS).
As the testcase shows, it isn't enough, potential_constant_expression_1
can catch only some cases, as soon as one uses switch or ifs where at least
one of the possible paths could be constant expression, we can run into the
same codes during cxx_eval_constant_expression, so this patch handles those
there as well.
2023-02-01 Jakub Jelinek <jakub@redhat.com>
PR c++/108607
* constexpr.c (cxx_eval_constant_expression): Handle OMP_*
and OACC_* constructs as non-constant.
(potential_constant_expression_1): Handle OMP_SCAN.
* g++.dg/gomp/pr108607.C: New test.
(cherry picked from commit bfc070595bfb00abef88a002eee5d9117f5b86a7)
^ permalink raw reply [flat|nested] 9+ messages in thread