fortran/openmp.c - silence static analyzer warning
authorTobias Burnus <tobias@codesourcery.com>
Mon, 27 Jul 2020 07:12:15 +0000 (09:12 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Mon, 27 Jul 2020 07:12:15 +0000 (09:12 +0200)
gcc/fortran/ChangeLog:

* openmp.c (gfc_resolve_omp_directive): Remove NULL check
for clauses in EXEC_OMP_CRITICAL as it no longer can be NULL.

gcc/fortran/openmp.c

index f8f2439b6e43e3fc7f1318e8babbb91cdf0be271..4a0466f968dc5c947d08e9dc8636dac9a75f1f7b 100644 (file)
@@ -6560,8 +6560,7 @@ gfc_resolve_omp_directive (gfc_code *code, gfc_namespace *ns ATTRIBUTE_UNUSED)
       resolve_omp_atomic (code);
       break;
     case EXEC_OMP_CRITICAL:
-      if (code->ext.omp_clauses)
-       resolve_omp_clauses (code, code->ext.omp_clauses, NULL);
+      resolve_omp_clauses (code, code->ext.omp_clauses, NULL);
       if (!code->ext.omp_clauses->critical_name
          && code->ext.omp_clauses->hint
          && code->ext.omp_clauses->hint->ts.type == BT_INTEGER