]> 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>
Wed, 14 May 2025 18:16:04 +0000 (20:16 +0200)
gcc/fortran/ChangeLog:

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

gcc/fortran/dump-parse-tree.cc

index dd920f3ab08ae74c16ed04573563762cf872ed5f..8d5e25dd10b8c83072e7af17545b4772ced5e19d 100644 (file)
@@ -4415,10 +4415,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);