[Bug fortran/87212] Declaration with array constructor: Error message on valid code

2018-09-04 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87212

--- Comment #2 from Dominique d'Humieres  ---
The same error occurs with SUM.

[Bug fortran/87212] Declaration with array constructor: Error message on valid code

2018-09-04 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87212

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-09-04
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
> The following is from c.l.f. Jan 26, 2018 but seems to never have been
> filed as a bug report here (?), though Dominique d'Humieres presented
> a workaround for the code below.

Confirmed from 4.8 up to trunk (9.0). The workaround is to replace

  [(product([(j,j=1,i)]),i=0,13)] 

with

  product(reshape([([(j,j=1,i),(1_INT64,j=i+1,13)],i=0,13)],[13,14]),
dim=1)