]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
fortran, openmp: Add default case to trans-openmp switch in order to avoid -Wmaybe...
authorTamar Christina <tamar.christina@arm.com>
Sun, 21 Dec 2025 16:03:00 +0000 (16:03 +0000)
committerTamar Christina <tamar.christina@arm.com>
Sun, 21 Dec 2025 16:03:00 +0000 (16:03 +0000)
Similar to g:67356e61bd58ed17e4d5e67624a17a39e592fb5d
this adds a default case such that we don't get a warning on
type being used uninitialized.

This fixes the armhf bootstrap.

gcc/fortran/ChangeLog:

* trans-openmp.cc (gfc_trans_omp_clauses): Add default to switch.

gcc/fortran/trans-openmp.cc

index 254fc934af1914dcf28262dd15af206f85b08b97..d7f3c28182393a990f64b2ef0f19a2494cda66ed 100644 (file)
@@ -5281,6 +5281,7 @@ gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_clauses *clauses,
          type = OMP_CLAUSE_DEVICE_TYPE_ANY;
          break;
        case OMP_DEVICE_TYPE_UNSET:
+       default:
          gcc_unreachable ();
        }
       c = build_omp_clause (gfc_get_location (&where), OMP_CLAUSE_DEVICE_TYPE);