http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48478

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |accepts-invalid,
                   |                            |rejects-valid
   Last reconfirmed|                            |2011.04.06 13:20:35
                 CC|                            |burnus at gcc dot gnu.org
     Ever Confirmed|0                           |1
            Summary|Valid array-constructor     |Array-constructor with
                   |syntax rejected/invalid     |type-spec: reject
                   |accepted                    |valid/accept invalid

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-04-06 
13:20:35 UTC ---
Confirmed.

I first thought that it used to work properly (I cannot check at the moment),
but I now think that I mixed it up with "ALLOCATE ( type-spec :: ...)" which
has the the same syntax. Thus, the fix should be trivial: To use the same as
for allocate.

match.c's gfc_match_allocate has:

  m = match_type_spec (&ts);

While array.c's gfc_match_array_constructor uses:

 if (gfc_match_decl_type_spec (&ts, 0) == MATCH_YES)

(One should make sure that the array constructor also works in initialization
expressions, it might use a different code path.)

Reply via email to