Commit 7c42966e by Tobias Burnus Committed by Tobias Burnus

re PR fortran/56849 (Missing compile-time shape check for RESHAPE assignments…

re PR fortran/56849 (Missing compile-time shape check for RESHAPE assignments with an ORDER= attribute)

2013-04-07  Tobias Burnus  <burnus@net-b.de>

        PR fortran/56849
        * iresolve.c (gfc_resolve_reshape): Set shape also
        with order=.

2013-04-07  Tobias Burnus  <burnus@net-b.de>

        PR fortran/56849
        * gfortran.dg/reshape_5.f90: New.

From-SVN: r197550
parent 31ebb293
2013-04-07 Tobias Burnus <burnus@net-b.de>
PR fortran/56849
* iresolve.c (gfc_resolve_reshape): Set shape also
with order=.
2013-04-04 Janus Weil <janus@gcc.gnu.org>
PR fortran/40881
......
......@@ -2154,10 +2154,7 @@ gfc_resolve_reshape (gfc_expr *f, gfc_expr *source, gfc_expr *shape,
break;
}
/* TODO: Make this work with a constant ORDER parameter. */
if (shape->expr_type == EXPR_ARRAY
&& gfc_is_constant_expr (shape)
&& order == NULL)
if (shape->expr_type == EXPR_ARRAY && gfc_is_constant_expr (shape))
{
gfc_constructor *c;
f->shape = gfc_get_shape (f->rank);
......
2013-04-07 Tobias Burnus <burnus@net-b.de>
PR fortran/56849
* gfortran.dg/reshape_5.f90: New.
2013-04-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/56843
......
! { dg-do compile }
!
! PR fortran/56849
!
integer :: x(2,2),y(4)
y = reshape([1,2,3,4],[4])
x(:,1:1) = reshape(y(::2), [1,2], order=[1,2]) ! { dg-error "Different shape for array assignment at .1. on dimension 1 .2 and 1." }
print *, y
print *, x(:,1)
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment