title: Fortran, Finalization at (1) is not yet implemented
body: <p>I am trying to implement a simple finalizer, but I can't get even <a href="http://publib.boulder.ibm.com/infocenter/comphelp/v101v121/index.jsp?topic=/com.ibm.xlf121.aix.doc/language_ref/typeboundprocedures.html" rel="nofollow">this example</a> to compile:</p>
  
  <pre><code>  MODULE m
     TYPE :: t1
      REAL a,b
     END TYPE
     TYPE, EXTENDS(t1) :: t2
      REAL,POINTER :: c(:),d(:)
      CONTAINS
      FINAL :: t2f
     END TYPE
     TYPE, EXTENDS(t2) :: t3
      REAL,POINTER :: e
      CONTAINS
      FINAL :: t3f
     END TYPE
  
     CONTAINS
     SUBROUTINE t2f(x) ! Finalizer for TYPE(t2)'s extra components
      TYPE(t2) :: x
  
      print *, 'entering t2f'  
      IF (ASSOCIATED(x%c)) then
       print *, ' c allocated, cleaning up'
       DEALLOCATE(x%c)
      end if 
      IF (ASSOCIATED(x%d)) then 
       print *, ' d allocated, cleaning up'
       DEALLOCATE(x%d)
      end if  
     END SUBROUTINE
     SUBROUTINE t3f(y) ! Finalizer for TYPE(t3)'s extra components
      TYPE(t3) :: y
  
      print *, 'entering t3f'
      IF (ASSOCIATED(y%e)) then
        print *, ' e allocated, cleanup up'
        DEALLOCATE(y%e)
      end if 
     END SUBROUTINE
  END MODULE
  </code></pre>
  
  <p>using GNU Fortran (GCC) 4.8.2 20131212 (Red Hat 4.8.2-7) gives me this error output:</p>
  
  <blockquote>
    <p>$ gfortran -c
    m_example.f03 m_example.f03:5.26:</p>
    
    <p>TYPE, EXTENDS(t1) :: t2
                              1 Error: Finalization at (1) is not yet implemented m_example.f03:10.26:</p>
    
    <p>TYPE, EXTENDS(t2) :: t3
                              1 Error: Finalization at (1) is not yet implemented</p>
  </blockquote>
  
  <p>Is this a bug, does it mean that finalizers are not yet implemented in gfortran, or am I doing something wrong?</p>