+2015-11-24 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/68486
+ * simplify.c (gfc_simplify_cshift): Allow all EXPR_*.
+
2015-11-22 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68486
else
dm = 1;
- /* Copy array into 'a', simplify it, and then test for a constant array.
- An unexpected expr_type causes an ICE. */
- switch (array->expr_type)
- {
- case EXPR_VARIABLE:
- case EXPR_ARRAY:
- case EXPR_OP:
- a = gfc_copy_expr (array);
- gfc_simplify_expr (a, 0);
- if (!is_constant_array_expr (a))
- {
- gfc_free_expr (a);
- return NULL;
- }
- break;
- default:
- gcc_unreachable ();
+ /* Copy array into 'a', simplify it, and then test for a constant array. */
+ a = gfc_copy_expr (array);
+ gfc_simplify_expr (a, 0);
+ if (!is_constant_array_expr (a))
+ {
+ gfc_free_expr (a);
+ return NULL;
}
if (a->rank == 1)
+2015-11-24 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/68486
+ * gfortran.dg/simplify_cshift_3.f90
+
2015-11-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/68278
--- /dev/null
+! { dg-do compile }
+! PR fortran/68227
+! Original code contributed by Gerhard Steinmetz
+! <gerhard dot steinmetz dot fortran at t-online dot de >
+!
+program p
+
+ type t
+ end type
+
+ type t2
+ type(t), pointer :: a
+ end type
+
+ type(t), target :: x
+ type(t2), pointer :: y(:)
+ integer :: i
+ integer :: n = 2
+
+ allocate (y(n))
+ forall (i=1:n) y(i)%a = x
+
+end program p
--- /dev/null
+! { dg-do compile }
+subroutine foo ()
+ real(4), allocatable, save :: tmp (:, :)
+ real(4), pointer, save :: arr (:, :, :)
+ integer :: l, m, n
+ tmp = (cshift(cshift(arr (:,:,l),m,2),n,1))
+end subroutine foo