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

commit r16-6319-gc65fdb6b03d9146ee9a1ffcfcbc689b004b2b463
Author: Tamar Christina <[email protected]>
Date:   Sun Dec 21 16:03:00 2025 +0000

    fortran, openmp: Add default case to trans-openmp switch in order to avoid 
-Wmaybe-uninitialized warning
    
    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.

Diff:
---
 gcc/fortran/trans-openmp.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/fortran/trans-openmp.cc b/gcc/fortran/trans-openmp.cc
index 254fc934af19..d7f3c2818239 100644
--- a/gcc/fortran/trans-openmp.cc
+++ b/gcc/fortran/trans-openmp.cc
@@ -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);

Reply via email to