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

--- Comment #19 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:add31061ec23e07fdf749dc335308efc81151a3d

commit r10-6393-gadd31061ec23e07fdf749dc335308efc81151a3d
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Sat Feb 1 10:02:20 2020 +0100

    fortran: Fix up TYPE_ARG_TYPES of procs with scalar VALUE optional args
[PR92305]

    The following patch fixes
    -FAIL: libgomp.fortran/use_device_addr-1.f90   -O0  execution test
    -FAIL: libgomp.fortran/use_device_addr-2.f90   -O0  execution test
    that has been FAILing for several months on powerpc64le-linux.
    The problem is in the Fortran FE, which adds the artificial arguments
    for scalar VALUE OPTIONAL dummy args only to DECL_ARGUMENTS where the
    current function can see them, but not to TYPE_ARG_TYPES; if those
functions
    aren't varargs, this confuses calls.c to pass the remaining arguments
    (which aren't named (== not covered by TYPE_ARG_TYPES) and aren't varargs
    either) in a different spot from what the callee (which has proper
    DECL_ARGUMENTS for all args) expects.  For the artificial length arguments
    for character dummy args we already put them in both DECL_ARGUMENTS and
    TYPE_ARG_TYPES.

    2020-02-01  Jakub Jelinek  <ja...@redhat.com>

        PR fortran/92305
        * trans-types.c (gfc_get_function_type): Also push boolean_type_node
        types for non-character scalar VALUE optional dummy arguments.
        * trans-decl.c (create_function_arglist): Skip those in
        hidden_typelist.  Formatting fix.

Reply via email to