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

--- Comment #2 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
This patch allows the code to compile, but I have no idea
if it is correct.

Index: trans-expr.c
===================================================================
--- trans-expr.c        (revision 276837)
+++ trans-expr.c        (working copy)
@@ -7031,8 +7031,10 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym
        gfc_allocate_lang_decl (result);
       GFC_DECL_SAVED_DESCRIPTOR (result) = parmse.expr;
       gfc_free_expr (class_expr);
-      gcc_assert (parmse.pre.head == NULL_TREE
-                 && parmse.post.head == NULL_TREE);
+      if ((gfc_option.rtcheck & GFC_RTCHECK_BOUNDS)
+         && parmse.pre.head == NULL_TREE)
+       gcc_unreachable ();
+      gcc_assert (parmse.post.head == NULL_TREE);
     }

   /* Follow the function call with the argument post block.  */

Reply via email to