Hi Steve, Just a couple of small typos: "Unexpected expr_type cause an ICE" ; causes? "! An array of derived types workd too." ; works?
Apart from that it's OK for trunk. Thanks for the patch Cheers Paul On 20 November 2015 at 21:09, Steve Kargl <s...@troutmask.apl.washington.edu> wrote: > On Thu, Nov 19, 2015 at 04:58:36PM -0800, Steve Kargl wrote: >> >> 2015-11-19 Steven G. Kargl <ka...@gcc.gnu.org> >> >> * intrinsic.h: Prototype for gfc_simplify_cshift >> * intrinsic.c (add_functions): Use gfc_simplify_cshift. >> * simplify.c (gfc_simplify_cshift): Implement simplification of CSHIFT. >> (gfc_simplify_spread): Remove a FIXME and add error condition. >> >> 2015-11-19 Steven G. Kargl <ka...@gcc.gnu.org> >> >> * gfortran.dg/simplify_cshift_1.f90: New test. >> > > I've attached an updated patch. The changes consists of > 1) better/more comments > 2) re-organize code to reduce copying of the array. > 3) add optimization for a left/right shift that > returns the original array. > 4) Don't leak memory. > > -- > Steve -- Outside of a dog, a book is a man's best friend. Inside of a dog it's too dark to read. Groucho Marx