]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fortran: Add code gen for do,concurrent's LOCAL/LOCAL_INIT: Fix 'static_assert' ...
authorThomas Schwinge <tschwinge@baylibre.com>
Sat, 12 Apr 2025 08:53:14 +0000 (10:53 +0200)
committerThomas Schwinge <tschwinge@baylibre.com>
Sat, 12 Apr 2025 09:00:56 +0000 (11:00 +0200)
Fix-up for commit 2d7e1d6e40a13a5f160b584336795b80f193ec3b
"Fortran: Add code gen for do,concurrent's LOCAL/LOCAL_INIT [PR101602]":

    ../../source-gcc/gcc/fortran/trans-stmt.cc: In function ‘void gfc_trans_concurrent_locality_spec(bool, stmtblock_t*, std::vector<symbol_and_tree_t>*, gfc_expr_list**)’:
    ../../source-gcc/gcc/fortran/trans-stmt.cc:5157:59: error: expected ‘,’ before ‘)’ token
       static_assert (LOCALITY_LOCAL_INIT - LOCALITY_LOCAL == 1);
                                                               ^
    ../../source-gcc/gcc/fortran/trans-stmt.cc:5157:59: error: expected string-literal before ‘)’ token
    make[2]: *** [Makefile:1210: fortran/trans-stmt.o] Error 1

PR fortran/101602
gcc/fortran/
* trans-stmt.cc (gfc_trans_concurrent_locality_spec): Fix
'static_assert'.

gcc/fortran/trans-stmt.cc

index 94ecde096d58feb4b7844f431a2c51e9c8aaa63d..37f8acaea3f6c8b959332e09a3a34013404d4a53 100644 (file)
@@ -5154,7 +5154,7 @@ gfc_trans_concurrent_locality_spec (bool after_body, stmtblock_t *body,
   gfc_start_saved_local_decls ();
 
   cnt = 0;
-  static_assert (LOCALITY_LOCAL_INIT - LOCALITY_LOCAL == 1);
+  static_assert (LOCALITY_LOCAL_INIT - LOCALITY_LOCAL == 1, "locality_type");
   for (int type = LOCALITY_LOCAL;
        type <= LOCALITY_LOCAL_INIT; type++)
     for (el = locality_list[type]; el; el = el->next)