From: Thomas Koenig Date: Wed, 14 May 2025 18:11:48 +0000 (+0200) Subject: Fix explicit arrays with non-constant size for -fc-prototypes. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4f9c7b5258f2af89bba8e954c277981d2e2ee1ef;p=thirdparty%2Fgcc.git Fix explicit arrays with non-constant size for -fc-prototypes. 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. --- diff --git a/gcc/fortran/dump-parse-tree.cc b/gcc/fortran/dump-parse-tree.cc index 8d5e25dd10b..3cd2eeef11a 100644 --- a/gcc/fortran/dump-parse-tree.cc +++ b/gcc/fortran/dump-parse-tree.cc @@ -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; }