diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2016-01-01 17:02:51 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2016-01-01 17:02:51 +0000 |
commit | 591bb5e4bf6b9a75175b162bcf9d22bcae2b5abf (patch) | |
tree | d9ec0725f3a82d26c2a6aae4255fe82f7aa87938 /gcc/fortran/trans-array.c | |
parent | 942a13194f3efa752dbb1d9b8fbe6ceb9d104e13 (diff) | |
download | gcc-591bb5e4bf6b9a75175b162bcf9d22bcae2b5abf.zip gcc-591bb5e4bf6b9a75175b162bcf9d22bcae2b5abf.tar.gz gcc-591bb5e4bf6b9a75175b162bcf9d22bcae2b5abf.tar.bz2 |
re PR fortran/68864 (ICE: in gfc_get_descriptor_dimension, at fortran/trans-array.c:268)
2016-01-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/68864
* trans-array.c (evaluate_bound): If deferred, test that 'desc'
is an array descriptor before using gfc_conv_descriptor_xxx.
2016-01-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/68864
* gfortran.dg/pr68864.f90: New test.
From-SVN: r232026
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 71e0482..287b4af 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -3821,10 +3821,10 @@ evaluate_bound (stmtblock_t *block, tree *bounds, gfc_expr ** values, gfc_add_block_to_block (block, &se.pre); *output = se.expr; } - else if (deferred) + else if (deferred && GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (desc))) { /* The gfc_conv_array_lbound () routine returns a constant zero for - deferred length arrays, which in the scalarizer wrecks havoc, when + deferred length arrays, which in the scalarizer wreaks havoc, when copying to a (newly allocated) one-based array. Keep returning the actual result in sync for both bounds. */ *output = lbound ? gfc_conv_descriptor_lbound_get (desc, |