[Bug fortran/68440] ICE on declaring class variable with wrong attribute
gerhard.steinmetz.fortran@t-online.de
gcc-bugzilla@gcc.gnu.org
Thu Nov 19 17:46:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68440
--- Comment #2 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Detected :
$ cat z7.f90
subroutine s
type t
end type
class(t), allocatable :: x = t()
end
$ gfortran -g -O0 -Wall -fcheck=all z7.f90
z7.f90:4:29:
class(t), allocatable :: x = t()
1
Error: Allocatable 'x' at (1) cannot have an initializer
---
$ cat z8.f90
subroutine s
type t
end type
class(t), allocatable :: x
x = t()
end
$ gfortran -g -O0 -Wall -fcheck=all z8.f90
z8.f90:5:3:
x = t()
1
Error: Assignment to an allocatable polymorphic variable at (1) is not yet
supported
More information about the Gcc-bugs
mailing list