re PR fortran/60576 (FAIL: gfortran.dg/assumed_rank_7.f90)

2014-03-28  Mikael Morin  <mikael@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/60576
        * trans-expr.c (gfc_conv_derived_to_class): Avoid
        generation of out-of-bounds range expr.


Co-Authored-By: Tobias Burnus <burnus@net-b.de>

From-SVN: r208918
This commit is contained in:
Mikael Morin 2014-03-28 20:04:01 +00:00 committed by Tobias Burnus
parent 4cd8957f51
commit 61b6bed7e7
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2014-03-28 Mikael Morin <mikael@gcc.gnu.org>
Tobias Burnus <burnus@net-b.de>
PR fortran/
* trans-expr.c (gfc_conv_derived_to_class): Avoid
generation of out-of-bounds range expr.
2014-03-28 Mikael Morin <mikael@gcc.gnu.org>
PR fortran/60677

View File

@ -426,7 +426,11 @@ gfc_conv_derived_to_class (gfc_se *parmse, gfc_expr *e,
gfc_conv_expr_descriptor (parmse, e);
if (e->rank != class_ts.u.derived->components->as->rank)
class_array_data_assign (&block, ctree, parmse->expr, true);
{
gcc_assert (class_ts.u.derived->components->as->type
== AS_ASSUMED_RANK);
class_array_data_assign (&block, ctree, parmse->expr, false);
}
else
{
if (gfc_expr_attr (e).codimension)