https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87689

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Memory corruption on Power  |PowerPC64 ELFv2 function
                   |8                           |parameter passing violation

--- Comment #11 from Alan Modra <amodra at gmail dot com> ---
This patch avoids the failure.  Be warned, I shouldn't be let loose anywhere
near the gcc fortran support.  I'm just presenting it in the hope that someone
who does know what they're doing can develop a proper fix.

--- a/gcc/fortran/trans-types.c
+++ b/gcc/fortran/trans-types.c
@@ -3092,8 +3092,7 @@ gfc_get_function_type (gfc_symbol * sym)
        }
     }

-  if (!vec_safe_is_empty (typelist)
-      || sym->attr.is_main_program
+  if (sym->attr.is_main_program
       || sym->attr.if_source != IFSRC_UNKNOWN)
     is_varargs = false;

Reply via email to