diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2015-11-25 15:04:33 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2015-11-25 15:04:33 +0000 |
commit | 55250ed79fbc69935fe09a219307308fcd4c58e2 (patch) | |
tree | 276bacdded40164e7d3c72839a91830bd3990276 /gcc | |
parent | aa81272c9f98818910466728a58425d44884983a (diff) | |
download | gcc-55250ed79fbc69935fe09a219307308fcd4c58e2.zip gcc-55250ed79fbc69935fe09a219307308fcd4c58e2.tar.gz gcc-55250ed79fbc69935fe09a219307308fcd4c58e2.tar.bz2 |
re PR fortran/68227 (ICE on using variable limit in forall header (gfc_do_allocate))
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.
From-SVN: r230873
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/trans-stmt.c | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index da29a9d..f1ad5e1 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +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. + 2015-11-25 Ilmir Usmanov <me@ilmir.us> Cesar Philippidis <cesar@codesourcery.com> diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 06591a3..47ffd78 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; } |