Hello world, the attached patch fixes a 15/16 regression and should be fairly self-explanatory.
Regarding testing: I'm not sure I am up to the task of hacking
dejagnu to do this. I am now running local tests, which is
better than nothing (I guess).
Regression-testing: Passed, though this does not mean a lot.
I have attached the test script which passed.
Fix dumping non-interoperable types with -fc-prototypes.
gcc/fortran/ChangeLog:
PR fortran/120107
* dump-parse-tree.cc (write_type): Do not dump non-interoperable
types.diff --git a/gcc/fortran/dump-parse-tree.cc b/gcc/fortran/dump-parse-tree.cc
index dd920f3ab08..8d5e25dd10b 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);
test-pr120107.sh
Description: application/shellscript
