Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT

2015-12-31 Thread Steve Kargl
On Thu, Dec 31, 2015 at 09:57:10PM +0800, Gerald Pfeifer wrote: > On Sat, 21 Nov 2015, Steve Kargl wrote: > > 2015-11-21 Steven G. Kargl > > > > * simplify.c (gfc_simplify_cshift): Work around bootstrap issues > > due to inappropriate warning options. > > > Index: simplify.c > > ===

Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT

2015-12-31 Thread Gerald Pfeifer
On Sat, 21 Nov 2015, Steve Kargl wrote: > 2015-11-21 Steven G. Kargl > > * simplify.c (gfc_simplify_cshift): Work around bootstrap issues > due to inappropriate warning options. > Index: simplify.c > === > + /*

Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT

2015-11-22 Thread Dominique d'Humières
> Le 22 nov. 2015 à 17:21, Steve Kargl a > écrit : > > On Sun, Nov 22, 2015 at 09:51:09AM +0100, Dominique d'Humi??res wrote: >> >> Compiling the attached code after revision r230710 gives the ICE >> >> f951: internal compiler error: in gfc_simplify_cshift, at >> fortran/simplify.c:1823 >>

Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT

2015-11-22 Thread Steve Kargl
On Sun, Nov 22, 2015 at 09:51:09AM +0100, Dominique d'Humi??res wrote: > > Compiling the attached code after revision r230710 gives the ICE > > f951: internal compiler error: in gfc_simplify_cshift, at > fortran/simplify.c:1823 > > while it compiled before. > File a bug report, then fix rank

Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT

2015-11-22 Thread Dominique d'Humières
Hi Steve, Compiling the attached code after revision r230710 gives the ICE f951: internal compiler error: in gfc_simplify_cshift, at fortran/simplify.c:1823 while it compiled before. TIA Dominique mhd.f90 Description: Binary data

Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT

2015-11-21 Thread Steve Kargl
On Sat, Nov 21, 2015 at 11:26:17PM +0100, Eric Botcazou wrote: > > + * simplify.c (gfc_simplify_cshift): Work around bootstrap issues > > + due to inappropriate warning options. > > The warning options are appropriate, any dead code can potentially hide a bug > and should be flagged; every st

Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT

2015-11-21 Thread Eric Botcazou
> + * simplify.c (gfc_simplify_cshift): Work around bootstrap issues > + due to inappropriate warning options. The warning options are appropriate, any dead code can potentially hide a bug and should be flagged; every static analyzer will also do it and we would soon have PRs opened with

Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT

2015-11-21 Thread Steve Kargl
On Sat, Nov 21, 2015 at 09:22:40PM +0100, Dominique d'Humi??res wrote: > ???dm??? is actually not used, the building problem is fixed by the patch (I > did not rearrange the nested ???if???s) > > --- ../_clean/gcc/fortran/simplify.c 2015-11-21 20:59:57.0 +0100 > +++ gcc/fortran/simplify.

Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT

2015-11-21 Thread Dominique d'Humières
‘dm’ is actually not used, the building problem is fixed by the patch (I did not rearrange the nested ‘if’s) --- ../_clean/gcc/fortran/simplify.c2015-11-21 20:59:57.0 +0100 +++ gcc/fortran/simplify.c 2015-11-21 21:06:30.0 +0100 @@ -1792,7 +1792,6 @@ gfc_expr * gfc_simpli

Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT

2015-11-21 Thread Steve Kargl
> > > > > > Perhaps, bootstrap needs to set appropriate warning levels. > > > > https://gcc.gnu.org/ml/gcc-regression/2015-11/msg00648.html > > > > See 5 lines up. > Committed. Index: ChangeLog === --- ChangeLog (revision 23070

Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT

2015-11-21 Thread Steve Kargl
On Sat, Nov 21, 2015 at 11:19:22AM -0800, H.J. Lu wrote: > On Sat, Nov 21, 2015 at 10:20 AM, Steve Kargl > wrote: > > On Sat, Nov 21, 2015 at 10:07:35AM -0800, H.J. Lu wrote: > >> On Sat, Nov 21, 2015 at 8:26 AM, Steve Kargl > >> wrote: > >> > On Sat, Nov 21, 2015 at 11:41:51AM +0100, Paul Richar

Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT

2015-11-21 Thread H.J. Lu
On Sat, Nov 21, 2015 at 10:20 AM, Steve Kargl wrote: > On Sat, Nov 21, 2015 at 10:07:35AM -0800, H.J. Lu wrote: >> On Sat, Nov 21, 2015 at 8:26 AM, Steve Kargl >> wrote: >> > On Sat, Nov 21, 2015 at 11:41:51AM +0100, Paul Richard Thomas wrote: >> >> >> >> Just a couple of small typos: >> >> "Unex

Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT

2015-11-21 Thread Steve Kargl
On Sat, Nov 21, 2015 at 10:07:35AM -0800, H.J. Lu wrote: > On Sat, Nov 21, 2015 at 8:26 AM, Steve Kargl > wrote: > > On Sat, Nov 21, 2015 at 11:41:51AM +0100, Paul Richard Thomas wrote: > >> > >> Just a couple of small typos: > >> "Unexpected expr_type cause an ICE" ; causes? > >> "! An array of

Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT

2015-11-21 Thread H.J. Lu
On Sat, Nov 21, 2015 at 8:26 AM, Steve Kargl wrote: > On Sat, Nov 21, 2015 at 11:41:51AM +0100, Paul Richard Thomas wrote: >> >> 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 tr

Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT

2015-11-21 Thread Steve Kargl
On Sat, Nov 21, 2015 at 11:41:51AM +0100, Paul Richard Thomas wrote: > > 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 > Thanks for the the revie

Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT

2015-11-21 Thread Paul Richard Thomas
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 wrote: > On Thu, Nov 19, 2015 at 04:58:36PM

Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT

2015-11-20 Thread Steve Kargl
On Thu, Nov 19, 2015 at 04:58:36PM -0800, Steve Kargl wrote: > > 2015-11-19 Steven G. Kargl > > * intrinsic.h: Prototype for gfc_simplify_cshift > * intrinsic.c (add_functions): Use gfc_simplify_cshift. > * simplify.c (gfc_simplify_cshift): Implement simplification of CSHIFT.

Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT

2015-11-19 Thread Steve Kargl
On Thu, Nov 19, 2015 at 05:31:32PM -0800, Steve Kargl wrote: > On Thu, Nov 19, 2015 at 04:58:36PM -0800, Steve Kargl wrote: > > + else > > +{ > > + int dm; > > + > > + if (dim) > > + { > > + if (!gfc_is_constant_expr (dim)) > > + return NULL; > > + > > + dm = mpz_get_

Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT

2015-11-19 Thread Steve Kargl
On Thu, Nov 19, 2015 at 04:58:36PM -0800, Steve Kargl wrote: > + else > +{ > + int dm; > + > + if (dim) > + { > + if (!gfc_is_constant_expr (dim)) > + return NULL; > + > + dm = mpz_get_si (dim->value.integer); > + } > + else > + dm = 1; > + > +

[PATCH] (Partial) Implementation of simplificaiton of CSHIFT

2015-11-19 Thread Steve Kargl
The attached patch provides a partial implementation for the simplification for CSHIFT. It is partial in that it only applies to rank 1 arrays. For arrays with rank > 1, gfc_simplify_cshift will issue an error. Here, the intent is that hopefully someone that knows what they are doing with supply