https://gcc.gnu.org/g:c6ec3a9bddb4224a2369b0284ade4b474cd4b0ce
commit r15-9687-gc6ec3a9bddb4224a2369b0284ade4b474cd4b0ce Author: Thomas Koenig <tkoe...@gcc.gnu.org> Date: Tue May 13 19:02:06 2025 +0200 Do not dump non-interoperable types with -fc-prototypes. gcc/fortran/ChangeLog: PR fortran/120107 * dump-parse-tree.cc (write_type): Do not dump non-interoperable types. (cherry picked from commit fa0dff8e99e81bc7a3db1dc57d4fc340e0525b1d) Diff: --- gcc/fortran/dump-parse-tree.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/fortran/dump-parse-tree.cc b/gcc/fortran/dump-parse-tree.cc index 9501bccb803b..558a2853cc43 100644 --- a/gcc/fortran/dump-parse-tree.cc +++ b/gcc/fortran/dump-parse-tree.cc @@ -4380,10 +4380,11 @@ write_type (gfc_symbol *sym) { gfc_component *c; - /* Don't dump our iso c module, nor vtypes. */ + /* Don't dump types that are not interoperable, our very own ISO C Binding + module, or vtypes. */ if (sym->from_intmod == INTMOD_ISO_C_BINDING || sym->attr.flavor != FL_DERIVED - || sym->attr.vtype) + || sym->attr.vtype || !sym->attr.is_bind_c) return; fprintf (dumpfile, "typedef struct %s {\n", sym->name);