From 4f9c7b5258f2af89bba8e954c277981d2e2ee1ef Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Wed, 14 May 2025 20:11:48 +0200 Subject: [PATCH] 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. --- gcc/fortran/dump-parse-tree.cc | 2 ++ 1 file changed, 2 insertions(+) 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; } -- 2.47.2