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

anlauf at gcc dot gnu.org changed:

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

--- Comment #1 from anlauf at gcc dot gnu.org ---
Likely mine (r15-6408).

Can you try the following patch?

diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc
index 34891afb54c..e12fb0f7fb4 100644
--- a/gcc/fortran/trans-expr.cc
+++ b/gcc/fortran/trans-expr.cc
@@ -6488,7 +6488,8 @@ conv_null_actual (gfc_se * parmse, gfc_expr * e,
gfc_symbol * fsym)
          int dummy_rank;
          tree tmp = parmse->expr;

-         if (fsym->attr.allocatable && fsym->attr.intent == INTENT_UNKNOWN)
+         if ((fsym->attr.allocatable || fsym->attr.pointer)
+             && fsym->attr.intent == INTENT_UNKNOWN)
            fsym->attr.intent = INTENT_IN;
          tmp = gfc_conv_scalar_to_descriptor (parmse, tmp, fsym->attr);
          dummy_rank = fsym->as ? fsym->as->rank : 0;

Alternative workaround: replace

      type(keyword_list_t), pointer :: keyword_list

by

      type(keyword_list_t), pointer, intent(in) :: keyword_list

in the interface declaration.

Reply via email to