aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/dump-parse-tree.cc
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2025-05-13 19:02:06 +0200
committerThomas Koenig <tkoenig@gcc.gnu.org>2025-05-14 20:16:04 +0200
commitfa0dff8e99e81bc7a3db1dc57d4fc340e0525b1d (patch)
treeb04906ba0d67d2bb516f42790df03069bf37fb52 /gcc/fortran/dump-parse-tree.cc
parent814e29e390b1e9253f9a38e0d84f5ebe5de0c13e (diff)
downloadgcc-fa0dff8e99e81bc7a3db1dc57d4fc340e0525b1d.zip
gcc-fa0dff8e99e81bc7a3db1dc57d4fc340e0525b1d.tar.gz
gcc-fa0dff8e99e81bc7a3db1dc57d4fc340e0525b1d.tar.bz2
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.
Diffstat (limited to 'gcc/fortran/dump-parse-tree.cc')
-rw-r--r--gcc/fortran/dump-parse-tree.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/fortran/dump-parse-tree.cc b/gcc/fortran/dump-parse-tree.cc
index dd920f3..8d5e25d 100644
--- a/gcc/fortran/dump-parse-tree.cc
+++ b/gcc/fortran/dump-parse-tree.cc
@@ -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);