]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Do not dump non-interoperable types with -fc-prototypes.
authorThomas Koenig <tkoenig@gcc.gnu.org>
Tue, 13 May 2025 17:02:06 +0000 (19:02 +0200)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Thu, 15 May 2025 17:41:41 +0000 (19:41 +0200)
gcc/fortran/ChangeLog:

PR fortran/120107
* dump-parse-tree.cc (write_type): Do not dump non-interoperable
types.

(cherry picked from commit fa0dff8e99e81bc7a3db1dc57d4fc340e0525b1d)

gcc/fortran/dump-parse-tree.cc

index 9501bccb803b9947f15b09b0059efeffb42e18ec..558a2853cc43e9cfe7614a32013b645cfd9209e5 100644 (file)
@@ -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);