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

Paul Thomas <pault at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |pault at gcc dot gnu.org
                 CC|                            |pault at gcc dot gnu.org

--- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> ---
This is a case of a gcc_assert too many. Deleting the following cures the
problem:

          if (ss_expr != expr)
            /* Elemental function.  */
            gcc_assert ((expr->value.function.esym != NULL
                         && expr->value.function.esym->attr.elemental)
                        || (expr->value.function.isym != NULL
                            && expr->value.function.isym->elemental)
                        || gfc_inline_intrinsic_function_p (expr));
          else
            gcc_assert (ss_type == GFC_SS_INTRINSIC);

The preceeding if statement, has
      if (ss_expr != expr || ss_type != GFC_SS_FUNCTION)

so the second assert is redundant. I am disinclined to add any more clauses to
the first :-)

This change regtests OK.

However adding:

|| (gfc_expr_attr (expr).proc_pointer && gfc_expr_attr (expr).elemental)

does the job and regtests too.

Paul

Reply via email to