* [Bug fortran/104328] [12 Regression] ICE in resolve_omp_atomic, at fortran/openmp.cc:7760 (etc.) since r12-5793-g689407ef916503b2
2022-02-01 17:36 [Bug fortran/104328] New: ICE in resolve_omp_atomic, at fortran/openmp.cc:7760 (etc.) gscfq@t-online.de
@ 2022-02-02 10:06 ` marxin at gcc dot gnu.org
2022-02-02 15:30 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-02-02 10:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104328
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
CC| |burnus at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Ever confirmed|0 |1
Last reconfirmed| |2022-02-02
Summary|ICE in resolve_omp_atomic, |[12 Regression] ICE in
|at fortran/openmp.cc:7760 |resolve_omp_atomic, at
|(etc.) |fortran/openmp.cc:7760
| |(etc.) since
| |r12-5793-g689407ef916503b2
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-5793-g689407ef916503b2.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/104328] [12 Regression] ICE in resolve_omp_atomic, at fortran/openmp.cc:7760 (etc.) since r12-5793-g689407ef916503b2
2022-02-01 17:36 [Bug fortran/104328] New: ICE in resolve_omp_atomic, at fortran/openmp.cc:7760 (etc.) gscfq@t-online.de
2022-02-02 10:06 ` [Bug fortran/104328] [12 Regression] ICE in resolve_omp_atomic, at fortran/openmp.cc:7760 (etc.) since r12-5793-g689407ef916503b2 marxin at gcc dot gnu.org
@ 2022-02-02 15:30 ` jakub at gcc dot gnu.org
2022-02-02 19:29 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-02-02 15:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104328
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The first 2 testcases can be fixed with
--- openmp.cc.jj2 2022-01-21 11:01:12.458449420 +0100
+++ openmp.cc 2022-02-02 16:21:36.813563894 +0100
@@ -7757,6 +7757,7 @@ resolve_omp_atomic (gfc_code *code)
if (code->op == EXEC_IF
&& code->block
&& code->block->op == EXEC_IF
+ && code->block->next
&& code->block->next->op == EXEC_ASSIGN)
{
comp_cond = code->block->expr1;
The last 3 need other fixes.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/104328] [12 Regression] ICE in resolve_omp_atomic, at fortran/openmp.cc:7760 (etc.) since r12-5793-g689407ef916503b2
2022-02-01 17:36 [Bug fortran/104328] New: ICE in resolve_omp_atomic, at fortran/openmp.cc:7760 (etc.) gscfq@t-online.de
2022-02-02 10:06 ` [Bug fortran/104328] [12 Regression] ICE in resolve_omp_atomic, at fortran/openmp.cc:7760 (etc.) since r12-5793-g689407ef916503b2 marxin at gcc dot gnu.org
2022-02-02 15:30 ` jakub at gcc dot gnu.org
@ 2022-02-02 19:29 ` jakub at gcc dot gnu.org
2022-02-02 19:34 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-02-02 19:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104328
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Target Milestone|--- |12.0
CC| |jakub at gcc dot gnu.org
Priority|P3 |P4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/104328] [12 Regression] ICE in resolve_omp_atomic, at fortran/openmp.cc:7760 (etc.) since r12-5793-g689407ef916503b2
2022-02-01 17:36 [Bug fortran/104328] New: ICE in resolve_omp_atomic, at fortran/openmp.cc:7760 (etc.) gscfq@t-online.de
` (2 preceding siblings ...)
2022-02-02 19:29 ` jakub at gcc dot gnu.org
@ 2022-02-02 19:34 ` jakub at gcc dot gnu.org
2022-02-03 8:05 ` cvs-commit at gcc dot gnu.org
2022-02-03 8:15 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-02-02 19:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104328
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 52332
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52332&action=edit
gcc12-pr104328.patch
Untested fix.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/104328] [12 Regression] ICE in resolve_omp_atomic, at fortran/openmp.cc:7760 (etc.) since r12-5793-g689407ef916503b2
2022-02-01 17:36 [Bug fortran/104328] New: ICE in resolve_omp_atomic, at fortran/openmp.cc:7760 (etc.) gscfq@t-online.de
` (3 preceding siblings ...)
2022-02-02 19:34 ` jakub at gcc dot gnu.org
@ 2022-02-03 8:05 ` cvs-commit at gcc dot gnu.org
2022-02-03 8:15 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-03 8:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104328
--- 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:54d21dd5b5c5c5539505b3e037cdecb3b0ab3918
commit r12-7011-g54d21dd5b5c5c5539505b3e037cdecb3b0ab3918
Author: Jakub Jelinek <jakub@redhat.com>
Date: Thu Feb 3 09:01:07 2022 +0100
openmp, fortran: Improve !$omp atomic checks [PR104328]
The testcase shows some cases that weren't verified and we ICE on
invalid because of that.
One problem is that unlike before, we weren't checking if some expression
is EXPR_VARIABLE with non-NULL symtree in the case where there was
a conversion around it.
The other two issues is that we check that in an IF ->block is non-NULL
and then immediately dereference ->block->next->op, but on invalid
code with no statements in the then clause ->block->next might be NULL.
2022-02-02 Jakub Jelinek <jakub@redhat.com>
PR fortran/104328
* openmp.cc (is_scalar_intrinsic_expr): If must_be_var && conv_ok
and expr is conversion, verify it is a conversion from
EXPR_VARIABLE
with non-NULL symtree. Check ->block->next before dereferencing
it.
* gfortran.dg/gomp/atomic-27.f90: New test.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/104328] [12 Regression] ICE in resolve_omp_atomic, at fortran/openmp.cc:7760 (etc.) since r12-5793-g689407ef916503b2
2022-02-01 17:36 [Bug fortran/104328] New: ICE in resolve_omp_atomic, at fortran/openmp.cc:7760 (etc.) gscfq@t-online.de
` (4 preceding siblings ...)
2022-02-03 8:05 ` cvs-commit at gcc dot gnu.org
@ 2022-02-03 8:15 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-02-03 8:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104328
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed, thanks for the report.
^ permalink raw reply [flat|nested] 7+ messages in thread