diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2015-11-21 20:06:17 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2015-11-21 20:06:17 +0000 |
commit | fcae71a3687e8ff73c80293d1121655436f997dc (patch) | |
tree | d2096c6a55cbe0861186ab26680bec2224c81701 /gcc | |
parent | b1c1d761c1db41d94e6791c0b4f8a476e91fa671 (diff) | |
download | gcc-fcae71a3687e8ff73c80293d1121655436f997dc.zip gcc-fcae71a3687e8ff73c80293d1121655436f997dc.tar.gz gcc-fcae71a3687e8ff73c80293d1121655436f997dc.tar.bz2 |
simplify.c (gfc_simplify_cshift): Work around bootstrap issues due to inappropriate warning options.
2015-11-21 Steven G. Kargl <kargl@gcc.gnu.org>
* simplify.c (gfc_simplify_cshift): Work around bootstrap issues
due to inappropriate warning options.
From-SVN: r230710
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/simplify.c | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 1d11ae7..1f1d047 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,10 @@ 2015-11-21 Steven G. Kargl <kargl@gcc.gnu.org> + * simplify.c (gfc_simplify_cshift): Work around bootstrap issues + due to inappropriate warning options. + +2015-11-21 Steven G. Kargl <kargl@gcc.gnu.org> + * simplify.c (gfc_simplify_cshift): Implement simplification of CSHIFT for rank=1 arrays. (gfc_simplify_spread): Remove a FIXME and add error condition. diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index 9886d9e..665ea82 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); } |