https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68440

--- Comment #2 from Gerhard Steinmetz <gerhard.steinmetz.fort...@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

Reply via email to