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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid, diagnostic

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
There current code is odd: The following is clearly invalid, but it is not
diagnosed - but it compiles:
  print *, [ type(t) :: ]
  end
Reason: "t" is never defined - and the reason for the next item.


Also the following is invalid - and compiles:

  print *, [ type(integer) :: ]
  end

Reason: TYPE(...), i.e. a declaration-type-spec, is not permitted; the standard
only permits an intrinsic-type-spec/derived-type-spec, i.e. "integer" or a
derived-type name like "t" without TYPE().


The Fortran 2008 standard has:

R469  ac-spec  is  type-spec ::
               or  [type-spec ::] ac-value-list

R402  type-spec  is  intrinsic-type-spec
                 or  derived-type-spec

R453  derived-type-spec  is  type-name [ ( type-param-spec-list ) ]

Reply via email to