aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/simplify.c
diff options
context:
space:
mode:
authorSteven G. Kargl <kargl@gcc.gnu.org>2015-11-24 18:58:28 +0000
committerSteven G. Kargl <kargl@gcc.gnu.org>2015-11-24 18:58:28 +0000
commitd7dc0f8037a3999144177147fb772ab26c2aad6a (patch)
tree79e892d961ed508ee3db9343d1484245acc93b17 /gcc/fortran/simplify.c
parent68ea24cb27d43522e597c2005a004c455b55115d (diff)
downloadgcc-d7dc0f8037a3999144177147fb772ab26c2aad6a.zip
gcc-d7dc0f8037a3999144177147fb772ab26c2aad6a.tar.gz
gcc-d7dc0f8037a3999144177147fb772ab26c2aad6a.tar.bz2
re PR fortran/68486 (187.facerec in SPEC CPU 2000 failed to build)
2015-11-24 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/68486 * simplify.c (gfc_simplify_cshift): Allow all EXPR_*. 2015-11-24 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/68486 * gfortran.dg/simplify_cshift_3.f90 From-SVN: r230832
Diffstat (limited to 'gcc/fortran/simplify.c')
-rw-r--r--gcc/fortran/simplify.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c
index b9c4039..c699aed 100644
--- a/gcc/fortran/simplify.c
+++ b/gcc/fortran/simplify.c
@@ -1805,23 +1805,13 @@ gfc_simplify_cshift (gfc_expr *array, gfc_expr *shift, gfc_expr *dim)
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)