public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, committed] PR fortran/PR68227
@ 2015-11-25 15:09 Steve Kargl
  0 siblings, 0 replies; only message in thread
From: Steve Kargl @ 2015-11-25 15:09 UTC (permalink / raw)
  To: fortran, gcc-patches

Committed to placate the masses.

2015-11-25  Steven G. Kargl  <kargl@gcc.gnu.org>

        PR fortran/68227
        * trans-stmt.c (gfc_do_allocate): Convert gcc_assert argument into
        into part of conditional statement.

Index: gcc/gcc/gcc/fortran/trans-stmt.c
===================================================================
--- gcc/gcc/gcc/fortran/trans-stmt.c    (revision 230851)
+++ gcc/gcc/gcc/fortran/trans-stmt.c    (working copy)
@@ -3125,9 +3125,8 @@ gfc_do_allocate (tree bytesize, tree siz
 
   type = build_range_type (gfc_array_index_type, gfc_index_zero_node, tmp);
   type = build_array_type (elem_type, type);
-  if (gfc_can_put_var_on_stack (bytesize))
+  if (gfc_can_put_var_on_stack (bytesize) && INTEGER_CST_P (size))
     {
-      gcc_assert (INTEGER_CST_P (size));
       tmpvar = gfc_create_var (type, "temp");
       *pdata = NULL_TREE;
     }

-- 
Steve

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-25 15:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-25 15:09 [PATCH, committed] PR fortran/PR68227 Steve Kargl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).