This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34402] New: Diagnose illegal initialization of derived type containing allocatable component
- From: "w6ws at earthlink dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Dec 2007 06:34:50 -0000
- Subject: [Bug fortran/34402] New: Diagnose illegal initialization of derived type containing allocatable component
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The initialization in following test case should be diagnosed as an error:
$ cat nocomp7.f90
module nocomp7
implicit none
type bad_t
real, allocatable :: x(:)
end type
! The following is illegal!
type (bad_t) :: bad = bad_t ( (/ 1., 3., 5., 7., 9. /) )
end module
$
$ gfortran --version
GNU Fortran (GCC) 4.3.0 20071005 (experimental) [trunk revision 127783]
Copyright (C) 2007 Free Software Foundation, Inc.
GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
$
$ gfortran --pedantic -c nocomp7.f90
$
--
Summary: Diagnose illegal initialization of derived type
containing allocatable component
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: w6ws at earthlink dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34402