[Bug c/99137] ICE in gimplify_scan_omp_clauses, at gimplify.c:9833

2021-07-01 Thread tschwinge at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99137

--- Comment #10 from Thomas Schwinge  ---
*** Bug 87912 has been marked as a duplicate of this bug. ***

[Bug c/99137] ICE in gimplify_scan_omp_clauses, at gimplify.c:9833

2021-03-06 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99137

Tobias Burnus  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #9 from Tobias Burnus  ---
FIXED on mainline (GCC 11), GCC 10 and GCC 9.

Thanks for the report!

As mentioned in the patch review at
  https://gcc.gnu.org/pipermail/gcc-patches/2021-March/566298.html
the issue was discussed in a OpenACC spec meeting (Issue 354) and it was agreed
but not yet voted on to use the OpenMP wording (valid assignment-expression).

When writing that patch, I tried to find likewise issues with other clauses.
Unless I missed one in 'gcc' or 'g++', it seems as if only 'async' was
affected.

[Bug c/99137] ICE in gimplify_scan_omp_clauses, at gimplify.c:9833

2021-03-06 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99137

--- Comment #8 from CVS Commits  ---
The releases/gcc-9 branch has been updated by Tobias Burnus
:

https://gcc.gnu.org/g:47a0284fe7d4c996cc054c13e196ee3983025fb3

commit r9-9270-g47a0284fe7d4c996cc054c13e196ee3983025fb3
Author: Tobias Burnus 
Date:   Fri Mar 5 11:41:44 2021 +0100

OpenACC: C/C++ - fix async parsing [PR99137]

gcc/c/ChangeLog:

PR c/99137
* c-parser.c (c_parser_oacc_clause_async): Reject comma
expressions.

gcc/cp/ChangeLog:

PR c/99137
* parser.c (cp_parser_oacc_clause_async): Reject comma expressions.

gcc/testsuite/ChangeLog:

PR c/99137
* c-c++-common/goacc/asyncwait-1.c: Update dg-error; add
additional test.

(cherry picked from commit 6ddedd3efa3fe482f76a4037521a06b3ac9f2a8b)

[Bug c/99137] ICE in gimplify_scan_omp_clauses, at gimplify.c:9833

2021-03-06 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99137

--- Comment #7 from CVS Commits  ---
The releases/gcc-10 branch has been updated by Tobias Burnus
:

https://gcc.gnu.org/g:ed8fede89a705b031d3123c502717d7bc8b29320

commit r10-9419-ged8fede89a705b031d3123c502717d7bc8b29320
Author: Tobias Burnus 
Date:   Fri Mar 5 11:41:44 2021 +0100

OpenACC: C/C++ - fix async parsing [PR99137]

gcc/c/ChangeLog:

PR c/99137
* c-parser.c (c_parser_oacc_clause_async): Reject comma
expressions.

gcc/cp/ChangeLog:

PR c/99137
* parser.c (cp_parser_oacc_clause_async): Reject comma expressions.

gcc/testsuite/ChangeLog:

PR c/99137
* c-c++-common/goacc/asyncwait-1.c: Update dg-error; add
additional test.

(cherry picked from commit 6ddedd3efa3fe482f76a4037521a06b3ac9f2a8b)

[Bug c/99137] ICE in gimplify_scan_omp_clauses, at gimplify.c:9833

2021-03-05 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99137

--- Comment #6 from CVS Commits  ---
The master branch has been updated by Tobias Burnus :

https://gcc.gnu.org/g:6ddedd3efa3fe482f76a4037521a06b3ac9f2a8b

commit r11-7520-g6ddedd3efa3fe482f76a4037521a06b3ac9f2a8b
Author: Tobias Burnus 
Date:   Fri Mar 5 11:41:44 2021 +0100

OpenACC: C/C++ - fix async parsing [PR99137]

gcc/c/ChangeLog:

PR c/99137
* c-parser.c (c_parser_oacc_clause_async): Reject comma
expressions.

gcc/cp/ChangeLog:

PR c/99137
* parser.c (cp_parser_oacc_clause_async): Reject comma expressions.

gcc/testsuite/ChangeLog:

PR c/99137
* c-c++-common/goacc/asyncwait-1.c: Update dg-error; add
additional test.

[Bug c/99137] ICE in gimplify_scan_omp_clauses, at gimplify.c:9833

2021-02-19 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99137

--- Comment #5 from Tobias Burnus  ---
Iff it is decided that it is invalid code, the following patch rejects it:
https://gcc.gnu.org/pipermail/gcc-patches/2021-February/565576.html

(I forgot to reload the PR before posting.)

[Bug c/99137] ICE in gimplify_scan_omp_clauses, at gimplify.c:9833

2021-02-18 Thread tschwinge at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99137

--- Comment #4 from Thomas Schwinge  ---
(In reply to Jakub Jelinek from comment #3)
> ice-on-invalid-code is when an error should be reported and instead of that
> the compiler crashes.
> ice-on-valid-code is when the code should compile without errors (perhaps
> with warnings, and not considering warnings promoted to errors) but the
> compiler crashes on it instead.

Sure, I understand that.  ICE is certainly bad, but I did wonder if this is
'ice-on-invalid-code' (should get error diagnostic instead of ICE), or
'ice-on-valid-code' (should accept this code; 'async(1, 2)' evaluates to
'async(2)').

> I have no idea what OpenACC says about this if anything

I've filed  "What does
'async(1, 2)' mean?" (only visible to members of OpenACC GitHub).

> in OpenMP [...]

Thanks, that makes much sense to me.

[Bug c/99137] ICE in gimplify_scan_omp_clauses, at gimplify.c:9833

2021-02-18 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99137

--- Comment #3 from Jakub Jelinek  ---
ice-on-invalid-code is when an error should be reported and instead of that the
compiler crashes.
ice-on-valid-code is when the code should compile without errors (perhaps with
warnings, and not considering warnings promoted to errors) but the compiler
crashes on it instead.
I have no idea what OpenACC says about this if anything, in OpenMP we've
clarified that in clauses all the expressions in the grammar except a few
explicitly mentioned cases are assignment expressions and so commas should
appear there only nested, like schedule(static, (1, 2)) is valid, while
schedule(static, 1, 2) is invalid.
"Each of the expressions used in the OpenMP syntax inside of the clauses must
be a valid assignment-expression of the base language unless otherwise
specified."

[Bug c/99137] ICE in gimplify_scan_omp_clauses, at gimplify.c:9833

2021-02-18 Thread tschwinge at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99137

Thomas Schwinge  changed:

   What|Removed |Added

   Keywords|openmp  |openacc
 Target|x86_64-pc-linux-gnu |

--- Comment #2 from Thomas Schwinge  ---
First need to clarify if this is really 'ice-on-invalid-code' or maybe
'ice-on-valid-code'?  This depends on interpretation of the comma: is 'async(1,
2)' an invalid list, or is this a C/C++ comma operator, where '1, 2' simply
evaluates to '2'?

There are other clauses that do take a list (for example: 'wait(1, 2)'), so I
would assume that the intention is not that different clauses have different
behavior regarding interpretation of the comma, so indeed 'async(1, 2)' should
be rejected at parse-time.  I have however not yet looked up what the OpenACC
specification says about this.

[Bug c/99137] ICE in gimplify_scan_omp_clauses, at gimplify.c:9833

2021-02-17 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99137

Jakub Jelinek  changed:

   What|Removed |Added

   Last reconfirmed||2021-02-17
 CC||burnus at gcc dot gnu.org,
   ||jakub at gcc dot gnu.org,
   ||tschwinge at gcc dot gnu.org
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Not a regression, ICEs since r5-6458-g41dbbb3789850dfea98dd8984f69806284f87b6e
when -fopenacc support has been introduced.