From: kargl Date: Sat, 21 Nov 2015 20:06:17 +0000 (+0000) Subject: 2015-11-21 Steven G. Kargl X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=253279a4c6ef651e6b3d1b1c9fecf422826156f3;p=thirdparty%2Fgcc.git 2015-11-21 Steven G. Kargl * simplify.c (gfc_simplify_cshift): Work around bootstrap issues due to inappropriate warning options. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230710 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 1d11ae74ff20..1f1d04774060 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2015-11-21 Steven G. Kargl + + * simplify.c (gfc_simplify_cshift): Work around bootstrap issues + due to inappropriate warning options. + 2015-11-21 Steven G. Kargl * simplify.c (gfc_simplify_cshift): Implement simplification of diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index 9886d9e20e6c..665ea82ee230 100644 --- a/gcc/fortran/simplify.c +++ b/gcc/fortran/simplify.c @@ -1869,6 +1869,15 @@ gfc_simplify_cshift (gfc_expr *array, gfc_expr *shift, gfc_expr *dim) else { /* FIXME: Deal with rank > 1 arrays. For now, don't leak memory. */ + + /* GCC bootstrap is too stupid to realize that the above code for dm + is correct. First, dim can be specified for a rank 1 array. It is + not needed in this nor used here. Second, the code is simply waiting + for someone to implement rank > 1 simplification. For now, add a + pessimization to the code that has a zero valid reason to be here. */ + if (dm > array->rank) + gcc_unreachable (); + gfc_free_expr (a); }