------- Comment #2 from dfranke at gcc dot gnu dot org 2009-12-08 20:33 -------
(In reply to comment #0)
> ! The following is illegal!
> type (bad_t) :: bad = bad_t ( (/ 1., 3., 5., 7., 9. /) )
I don't get it. "Fortran 95/2003 explained" by Metcalf has exactly this in the
example (figure 12.3, p243) for allocatable components. I don't have the
standard section, but Metcalf states:
"In a structure constructor, an expression corresponding to an allocatable
component must be an array or a reference to the intrinsic function NULL with
no arguments. [...] If it is an array, but not an allocatable array, the
component is allocated with the same bounds and is assigned the same value."
If compiled with "-std=f95", gfortran complains about allocatable components in
general and accepts it with "-std=f2003". So, where's the actual problem?
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dfranke at gcc dot gnu dot
| |org
Status|NEW |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34402