]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix explicit arrays with non-constant size for -fc-prototypes.
authorThomas Koenig <tkoenig@gcc.gnu.org>
Wed, 14 May 2025 18:11:48 +0000 (20:11 +0200)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Wed, 14 May 2025 18:16:43 +0000 (20:16 +0200)
gcc/fortran/ChangeLog:

PR fortran/120139
* dump-parse-tree.cc (get_c_type_name): If no constant
size of an array exists, output an asterisk.

gcc/fortran/dump-parse-tree.cc

index 8d5e25dd10b8c83072e7af17545b4772ced5e19d..3cd2eeef11a6ee3164efd57ac6bc12c0c49a67bf 100644 (file)
@@ -4371,6 +4371,8 @@ get_c_type_name (gfc_typespec *ts, gfc_array_spec *as, const char **pre,
          mpz_clear (sz);
          *asterisk = false;
        }
+      else
+       *asterisk = true;
     }
   return ret;
 }