[Bug fortran/68009] [6 Regression] prototype for gfortran_runtime_error with inline matmul

hubicka at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Dec 3 06:36:00 GMT 2015


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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org

--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
See implementation of stdarg_p in tree.c:

/* Return true if TYPE has a variable argument list.  */

bool
stdarg_p (const_tree fntype)
{
  function_args_iterator args_iter;
  tree n = NULL_TREE, t;

  if (!fntype)
    return false;

  FOREACH_FUNCTION_ARGS (fntype, t, args_iter)
    {
      n = t;
    }

  return n != NULL_TREE && n != void_type_node;
}

The calling convetion of stdarg functions need not to be compatible with
non-stdarg. This is the case of x86_64, too, where %rax sets number of SSE
registers used when calling variadic function.

So the fortran FE should produce a protottype that retuns true for stdarg_p.
This is done via build_varargs_function_type_array


More information about the Gcc-bugs mailing list