From 55250ed79fbc69935fe09a219307308fcd4c58e2 Mon Sep 17 00:00:00 2001 From: "Steven G. Kargl" Date: Wed, 25 Nov 2015 15:04:33 +0000 Subject: [PATCH] re PR fortran/68227 (ICE on using variable limit in forall header (gfc_do_allocate)) 2015-11-25 Steven G. Kargl PR fortran/68227 * trans-stmt.c (gfc_do_allocate): Convert gcc_assert argument into into part of conditional statement. From-SVN: r230873 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/trans-stmt.c | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index da29a9d8f42..f1ad5e1f2b5 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2015-11-25 Steven G. Kargl + + PR fortran/68227 + * trans-stmt.c (gfc_do_allocate): Convert gcc_assert argument into + into part of conditional statement. + 2015-11-25 Ilmir Usmanov Cesar Philippidis diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 06591a31a3e..47ffd78eee6 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -3125,9 +3125,8 @@ gfc_do_allocate (tree bytesize, tree size, tree * pdata, stmtblock_t * pblock, 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; } -- 2.30.2