[Bug fortran/60357] New: structure constructor with unspecified values for allocatable components
antony at cosmologist dot info
gcc-bugzilla@gcc.gnu.org
Thu Feb 27 14:56:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60357
Bug ID: 60357
Summary: structure constructor with unspecified values for
allocatable components
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: antony at cosmologist dot info
This valid F2008 code is rejected:
module testmod
Type A
integer :: X = 1
integer, allocatable :: y
end type A
end module
program testerprog
use testmod
Type(A) :: Me = A(X=1)
end program
Compiler error is:
Type(A) :: Me = A(X=1)
1
Error: No initializer for component 'y' given in the structure constructor at
(1)!
However initialization statements are not required for allocatable components.
More information about the Gcc-bugs
mailing list