Found at http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/3f6348b03eaed435 The error message: call print( [ ] ) 1 Error: Empty array constructor at (1) is not allowed is misleading at only empty array constructors without typespec are invalid. Thus, the following is valid: call print( [ real :: ] ) Expect: Error message: "Error: Empty array constructor at (1) is not allowed without type-spec" or "Error: Empty array constructor without type-spec at (1) is not allowed" F2008: R468 array-constructor is (/ ac-spec /) or lbracket ac-spec rbracket R469 ac-spec is type-spec :: or [type-spec ::] ac-value-list "An empty sequence forms a zero-sized array."
Draft patch - feel free to take it, I am not sure when I have the time to submit it. --- a/gcc/fortran/array.c +++ b/gcc/fortran/array.c @@ -1054,7 +1054,8 @@ gfc_match_array_constructor (gfc_expr **result) goto done; else { - gfc_error ("Empty array constructor at %C is not allowed"); + gfc_error ("Empty array constructor without type-spec at %C is not " + "allowed"); goto cleanup; } }
Still there two years and a half later at revision 200429. What is wrong with the patch in comment #1?
(In reply to Dominique d'Humieres from comment #2) > Still there two years and a half later at revision 200429. What is wrong > with the patch in comment #1? Nothing - it just needs to be packaged.
> Nothing - it just needs to be packaged. Do you want me to do it?
> Do you want me to do it? No feedback for more than two years. I am taking it.
Patch submitted at https://gcc.gnu.org/ml/fortran/2016-04/msg00024.html.
> Patch submitted at https://gcc.gnu.org/ml/fortran/2016-04/msg00024.html. Flatly rejected at https://gcc.gnu.org/ml/fortran/2016-04/msg00025.html. Per https://gcc.gnu.org/ml/fortran/2016-04/msg00030.html > The above error is correct. Adding any text referring > to type-spec is wrong. closing as INVALID.