>>> On Wed, Apr 06, 2016 at 05:44:55PM +0200, Dominique d'Humières wrote:
>>>> Is the following patch OK (regtested on x86_64-apple-darwin15)? Should it 
>>>> be back ported to the gcc-5 branch?
>>> 
>>> No and No.
> Le 7 avr. 2016 à 15:59, Steve Kargl <s...@troutmask.apl.washington.edu> a 
> écrit :
> 
> The latter is obvious as this "fixes" neither a regression
> nor documentation.  

I won’t argue.

> For the former, see Fortran 95, section 4.5.
> 
> -- 
> steve


Are you referring to

(a)  An empty sequence forms a zero-sized rank-one array.

(b) The type and type parameters of an array constructor are those of the 
ac-value expressions.

(c) something else?

For (a) gfortran accepts zero-sized rank-one array with a type as shown by the 
instances in the added test.

AFAIU (b), it implicitly rules out a zero-sized rank-one array without a type, 
which is rejected by gfortran (if not what is the type of ‘[ ]’ and what should 
be the result of SUM([ ])?). Note that I see

NOTE 4.73
Examples of zero-size array constructors are:
[ INTEGER :: ]

in my copy of the f2015 draft.

Note that the patch is not mine but has been submitted by Tobias Burnus more 
than five years ago. It does not change any gfortran functionality and is only 
intended to help the end user. 

I have no intention to fight for this patch. If you think it is really 
irrelevant, please close the PR according your taste.

Dominique



Reply via email to