Re: Optimization of spread

2022-11-16 Thread Théo Cavignac via Fortran
Mikael, Thomas, Thank you very much for being so welcoming. > The source is actually more C than C++ (the fortran front-end at least). That's good to know, I am much more comfortable with C. > It requires little C++ skills, but time and willingness to decipher its > complexity. Yes, I don't expe

Re: [PATCH] Fortran: ICE in simplification of array expression involving power [PR107680]

2022-11-16 Thread Mikael Morin
Le 15/11/2022 à 21:45, Harald Anlauf via Fortran a écrit : Dear all, when constant expressions involve parentheses, array constructors, typespecs, and the power operator (**), we could fail with an ICE during simplification in arith_power. Debugging of the testcase showed we call the proper typ

Re: typespec in forall and implied-do

2022-11-16 Thread Steve Kargl via Fortran
On Tue, Nov 15, 2022 at 05:13:19PM -0800, Steve Kargl via Fortran wrote: > > This patch allows the above to compile and execute. > It has only had some light testing, and I do not know > if nested forall and implied-do loops do work. Feel > free to commit as I cannot. For nested implied-do loops

Re: typespec in forall and implied-do

2022-11-16 Thread Steve Kargl via Fortran
On Tue, Nov 15, 2022 at 05:13:19PM -0800, Steve Kargl via Fortran wrote: > > This patch allows the above to compile and execute. > It has only had some light testing, and I do not know > if nested forall and implied-do loops do work. Feel > free to commit as I cannot. > Appears to work for nest

Re: typespec in forall and implied-do

2022-11-16 Thread Steve Kargl via Fortran
On Tue, Nov 15, 2022 at 06:31:16PM -0800, Steve Kargl via Fortran wrote: > On Tue, Nov 15, 2022 at 05:13:19PM -0800, Steve Kargl via Fortran wrote: > > F2008 introduced the inclusion of a typespec in a forall > > statement, and thn F2018 a typespec was allowed in an > > implied-do. There may even

Re: [PATCH] Fortran: ICE in simplification of array expression involving power [PR107680]

2022-11-16 Thread Harald Anlauf via Fortran
Am 16.11.22 um 12:39 schrieb Mikael Morin: Le 15/11/2022 à 21:45, Harald Anlauf via Fortran a écrit : Dear all, when constant expressions involve parentheses, array constructors, typespecs, and the power operator (**), we could fail with an ICE during simplification in arith_power. Debugging o

[PATCH] Fortran: error recovery after reference to bad CLASS variable [PR107681]

2022-11-16 Thread Harald Anlauf via Fortran
Dear all, the attached obvious patch fixes a NULL pointer dereference when referencing a CLASS variable with a bad decl. Pushed as r13-4107-g96e4244ef3ccf4867ca4e37fbc6800e64ef30af6 after regtesting on x86_64-pc-linux-gnu. Thanks, Harald From 96e4244ef3ccf4867ca4e37fbc6800e64ef30af6 Mon Sep 17

Re: typespec in forall and implied-do

2022-11-16 Thread Steve Kargl via Fortran
On Tue, Nov 15, 2022 at 05:13:19PM -0800, Steve Kargl via Fortran wrote: > F2008 introduced the inclusion of a typespec in a forall > statement, and thn F2018 a typespec was allowed in an > implied-do. There may even be a few bug reports. > New patch. This one handles the example of an implied-

[PATCH, committed] Fortran: ICE on procedure arguments with non-integer length [PR107707]

2022-11-16 Thread Harald Anlauf via Fortran
Dear all, I've committed the attached patch for Steve after regtesting. It obviously checks the types of character length to be integer before passing them to mpz_*. Pushed as r13-4113-gbdd784fc48a283d54f5f1e3cc2a0668c14dd3bee Thanks, Harald @Steve: please close PR if you think everything is ok

Re: [PATCH, committed] Fortran: ICE on procedure arguments with non-integer length [PR107707]

2022-11-16 Thread Steve Kargl via Fortran
On Wed, Nov 16, 2022 at 10:58:18PM +0100, Harald Anlauf via Fortran wrote: > > @Steve: please close PR if you think everything is ok. > Thanks. I'll close the pr. -- Steve

Re: typespec in forall and implied-do

2022-11-16 Thread Steve Kargl via Fortran
On Wed, Nov 16, 2022 at 01:30:07PM -0800, Steve Kargl via Fortran wrote: > On Tue, Nov 15, 2022 at 05:13:19PM -0800, Steve Kargl via Fortran wrote: > > F2008 introduced the inclusion of a typespec in a forall > > statement, and thn F2018 a typespec was allowed in an > > implied-do. There may even

Re: typespec in forall and implied-do

2022-11-16 Thread Steve Kargl via Fortran
On Wed, Nov 16, 2022 at 04:32:39PM -0800, Steve Kargl via Fortran wrote: > On Wed, Nov 16, 2022 at 01:30:07PM -0800, Steve Kargl via Fortran wrote: > > On Tue, Nov 15, 2022 at 05:13:19PM -0800, Steve Kargl via Fortran wrote: > > > F2008 introduced the inclusion of a typespec in a forall > > > state

Re: [PATCH 4/5] value-range: Add as_string diagnostics helper

2022-11-16 Thread Jeff Law via Fortran
On 11/12/22 16:55, Andrew Pinski via Gcc-patches wrote: On Sat, Nov 12, 2022 at 3:47 PM Bernhard Reutner-Fischer via Gcc-patches wrote: gcc/ChangeLog: * value-range.cc (get_bound_with_infinite_markers): New static helper. (irange::as_string): New definition. * valu

Re: typespec in forall and implied-do

2022-11-16 Thread Steve Kargl via Fortran
On Wed, Nov 16, 2022 at 04:47:50PM -0800, Steve Kargl via Fortran wrote: > On Wed, Nov 16, 2022 at 04:32:39PM -0800, Steve Kargl via Fortran wrote: > > On Wed, Nov 16, 2022 at 01:30:07PM -0800, Steve Kargl via Fortran wrote: > > > On Tue, Nov 15, 2022 at 05:13:19PM -0800, Steve Kargl via Fortran wr